You can translate the question and the replies:

CONTEXT clause via a PowerBI query

How do you pass the CONTEXT clause via a PowerBI query connecting to Denodo using native Denodo connectors? If I test the query in the Denodo UI directly it works BUT if I use the same query in PowerBI I get this error: DataSource.Error: ODBC: ERROR [HY000] ERROR: Syntax error: Exception parsing query near 'CONTEXT' java.sql.SQLException: Syntax error: Exception parsing query near 'CONTEXT'; Error while executing the query Details: Data-SourceKind=DenodoForPowerBl
user
01-03-2024 02:58:53 -0500
code

1 Answer

Hi, It looks like this is an issue with Power BI and not an issue with Denodo. I was able to use DBeaver to send a query with a context clause to Denodo and it worked perfectly. I tried to do the same with Power BI and kept running into similar errors to what you experienced. Before the query has the chance to be sent to Denodo, it is being parsed as a SQL query. The context clause is a VQL clause rather than a SQL clause, which causes the parser to throw an error. The query I was using was `SELECT * FROM <table name> CONTEXT (‘QUERYTIMEOUT’ = ‘<number of milliseconds>’)`. In this example of query timeout, I found a workaround by simply editing the "Database" field of the DSN to have the following format: `<database_name>?queryTimeout=<milliseconds>` For more information on adjusting the settings of your DSN connection, view the KB article [How To Connect To Denodo From Power BI](https://community.denodo.com/kb/en/view/document/How%20to%20connect%20to%20Denodo%20from%20Power%20BI?tag=Consumers). The workaround for your situation will be dependent on the specific context clause you are trying to run. Hope this helps!
Denodo Team
04-03-2024 15:44:40 -0500
code
You must sign in to add an answer. If you do not have an account, you can register here