The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.
Forum Discussion
KK2012
1 year agoNew Contributor III
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.
4 Replies
- matt515New Contributor III
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.
- DanielWillisValued Contributor
Try clicking this button. It should hopefully tell you why records were rejected
- KK2012New Contributor III
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.
Related Content
- 2 months ago
- 2 years ago