Forum Discussion
Dataflow Scheduled Refresh on Semantic Model Error, key did not match any rows in the table
- 1 year ago
Hi Brenz Yes, it might be able to solve the issue, as Gen2 supports mid-stream token refresh,unlike Gen 1 where OAuth2 tokens expire after an hour. So Gen2 will be preventing token expiration during refresh.
Hi Brenz It seems to be a key mismatch error in your ODBC Amazon Athena Dataflow, preventing the scheduled refresh.Please try the below to resolve your issue
Check Table & Schema: Ensure contact_flow exists and matches the expected schema.
Verify Authentication: Confirm credentials have proper access.
Test ODBC Connection: Ensure it works outside Power BI.
Check Gateway Setup: If using a gateway, confirm correct mapping.
Hello Akash_Varuna, thank you for your response. Upon checking your resolutions above, all are configured correctly. As additional context, whenever I go to the data source credential settings on the semantic model and sign in again, the on-demand refresh will work. The credentials are expired after every hour or so because of OAuth2, I believe this could be the reason why.
- Akash_Varuna1 year agoSuper User
Hi Brenz Ok, this might be the reason for error. The OAuth2 token is likely expiring, causing authentication failures during scheduled refresh.
Could you try using service principal authentication or checking if your data source allows automatic token refresh?
- Brenz1 year agoFrequent Visitor
Hello Akash, thank you for your response. We will explore on using service principal authentication. Additionally, our dataflow is set up in Gen1 currently, if we migrate to Gen2 would that solve the problem? This is based on the documentation I found regarding this.
"When using OAuth2 credentials in Dataflows Gen1, the gateway doesn't support refreshing tokens automatically when access tokens expire. Tokens typically expire 1 hour after the refresh starts, but can expire in less than 1 hour, depending on the data source and the tenant policies. Dataflows Gen2, Semantic models, Data pipelines are able to refresh tokens mid-stream and should not be impacted due to this."
https://learn.microsoft.com/en-us/data-integration/gateway/service-gateway-onprem-faq#why-do-i-get-the-errors--invalidconnectioncredentials--or--accessunauthorized--when-accessing-data-sources-using-oauth2-credentials-from-dataflows-gen1-even-though-the-credentials-are-updated-recently--mid-stream-token-refresh-issue--- Akash_Varuna1 year agoSuper User
Hi Brenz Yes, it might be able to solve the issue, as Gen2 supports mid-stream token refresh,unlike Gen 1 where OAuth2 tokens expire after an hour. So Gen2 will be preventing token expiration during refresh.