- Newest
- Most votes
- Most comments
The issue you're experiencing seems to be related to how the Timestream ODBC driver and Power BI are handling time-based queries in DirectQuery mode. This appears to be a compatibility problem between the SQL syntax generated by Power BI and the SQL syntax expected by Timestream.
The error message you've shared indicates that Power BI is generating a SQL query with a timestamp format that Timestream doesn't recognize. Specifically, the {ts '...'} syntax is not compatible with Timestream's query language.
This is likely not a misconfiguration on your end, but rather a limitation or bug in how the Timestream ODBC driver interprets queries generated by Power BI in DirectQuery mode.
To work around this issue, you might consider the following options:
-
Use the Import mode instead of DirectQuery for your Timestream data in Power BI. While this may not be ideal for larger datasets, it could allow you to apply time-based filters without encountering this error.
-
Create calculated columns or measures in Power BI that transform the time data into a format that doesn't trigger this error when filtered.
-
If possible, pre-aggregate your data in Timestream to reduce the need for time-based filtering in Power BI.
-
Contact AWS support to report this issue, as it may be a bug in the Timestream ODBC driver that needs to be addressed.
Given that you're able to successfully connect and retrieve data for other types of queries, it's likely that your overall setup is correct. The problem appears to be specific to time-based filtering in DirectQuery mode.
If none of these workarounds are suitable for your use case, you may need to wait for an update to the Timestream ODBC driver or the Power BI connector that addresses this compatibility issue.
Sources
ODBC - Amazon Timestream
Use the Amazon Athena Power BI connector - Amazon Athena
Troubleshooting connection with the ODBC driver - Amazon Timestream
Relevant content
- asked 3 years ago
- asked 2 years ago