-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with Power BI connection filtering on VARCHARS #66
Comments
I would like to investigate this, just I wonder if you can guide me through the steps in Power BI to reproduce this? What I have so far: Table in DuckDB: create table tab1 (col1 int, col2 text)
insert into tab1 values(41, 'foo')
insert into tab1 values(42, 'bar') Query in PowerBI:
Applying the slicer to col2 I cannot reproduce it so far: |
Hi @staticlibs, thanks for the response. Is this coming from a local DuckDB file, or from a table in MotherDuck? I have exclusively using MotherDuck as my source db |
This is from local DuckDB accessed with ODBC (with the |
I can reproduce it now using DuckDB Power Query Connector by MotherDuck from PowerBI instead of the generic ODBC data source. I will follow up. |
In the result set of `SQLGetTypeInfo` function the `COLUMN_SIZE` column for `VACHAR` type must contain the length value in characters. This change replaces `-1` value for this column with `MAX_INT` value. This allows client tools based on Microsoft Power Query to use parameter binding for `VARCHAR` columns/parameters. Testing: existing tests, that were checking for `-1` value, are updated to check for `MAX_INT`. Fixes: duckdb#66
The problem was in the metadata about
I've filed #67 to replace |
In the result set of `SQLGetTypeInfo` function the `COLUMN_SIZE` column for `VACHAR` type must contain the length value in characters. This change replaces `-1` value for this column with `MAX_INT` value. This allows client tools based on Microsoft Power Query to use parameter binding for `VARCHAR` columns/parameters. Testing: existing tests, that were checking for `-1` value, are updated to check for `MAX_INT`. Fixes: duckdb#66
Issue
When connecting a Power BI report to MotherDuck via DirectQuery, we are unable to filter on TEXT/VARCHAR columns. When using a Power BI slicer to filter on a VARCHAR value, the following message is displayed
"OLE DB or ODBC error: [Expression.Error] We couldn't fold the expression to the data source. Please try a simpler expression"
When filtering a VARCHAR column in the PowerQuery editor, we get the following error message:
"This step results in a query that is not supported in DirectQuery mode."
Steps to Recreate
The error is only occurring on DirectQuery mode, and I have had no issues on Import Mode. You are also able to use Power BI's "Diagnose/Run Diagnostics" to give more information on the error. It seems like the datatype is being sent from DuckDB to PowerBI as an unsupported type. I can provide any more information needed. Thank you!
The text was updated successfully, but these errors were encountered: