Skip to main content
Newcomer
October 31, 2024
Solved

Data Import Error: No valid DataKeys (Scenario / Time) found in data source

  • October 31, 2024
  • 4 replies
  • 0 views

 

Hi All,

I'm encountering an error while trying to import data:

"No valid DataKeys (Scenario / Time) found in data source. Review the source data load processing log and check one-to-one transformation rules to ensure that you have created proper Scenario and Time dimension rules for this data source."

I've attempted both options for the time dimension—applying 'Datakey Text' and then assigning the Time field, as well as using the 'current Data key time' options—but it’s still not working.

For reference, I've attached the relevant code:

```csharp
var fields = new List<string>
{
"ACCOUNT",
"ACTUAL",
"Time"
};

return fields;

string wfYear = TimeDimHelper.GetYearFromId(api.WorkflowUnitPk.TimeKey).ToString();
int wfMonth = TimeDimHelper.GetSubComponentsFromId(api.WorkflowUnitPk.TimeKey).Month;
string periodName = $"{wfYear}M{wfMonth}";

var sql = new StringBuilder();
sql.Append("SELECT ");
sql.Append("ACCOUNT, ");
sql.Append("ACTUAL, ");
sql.Append("Time ");
sql.Append("FROM [tablename] ");
sql.Append("WHERE Time = '" + periodName + "';");
```

If anyone has faced a similar situation or has suggestions, I would greatly appreciate your input. Thank you!

Best answer by KK2012

Thank you, All. I have fine-tuned the connector BR and DS fields, now data is coming correctly. I really appreciate your response and time on this issue. 

4 replies

Newcomer
October 31, 2024

I've had this issue before and in my case, I didn't have the amount field defined in the data source settings. Not sure if that's related to your issue but something you could check. 

Contributor
October 31, 2024

Try clicking this button. It should hopefully tell you why records were rejected

DanielWillis_1-1730411258883.png

 

OneStream Employee
October 31, 2024

Hi KK2012 this is a generic error that means your data source is not reading any data

KK2012AuthorAnswer
Newcomer
November 1, 2024

Thank you, All. I have fine-tuned the connector BR and DS fields, now data is coming correctly. I really appreciate your response and time on this issue.