Data Import Error: No valid DataKeys (Scenario / Time) found in data source
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!
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.