Skip to content
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

Filter on char type column fails using DirectQuery connection #34

Open
jjw24 opened this issue Jul 9, 2024 · 0 comments
Open

Filter on char type column fails using DirectQuery connection #34

jjw24 opened this issue Jul 9, 2024 · 0 comments

Comments

@jjw24
Copy link

jjw24 commented Jul 9, 2024

Hey there, in Power BI Desktop I am getting the below error when I try to filter the values on a char type column using DirectQuery:

However, filtering values on a varchar column works fine.

From the trace log this looks to be the query that the filter is executing:
select `C1`\ d\ afrom \ d\ a(\ d\ a select `trans_code`,\ d\ a ? as `C1`\ d\ a from `sales_order_test`\ d\ a where cast(`trans_code` as VARCHAR) = ?\ d\ a) as `ITBL`\ d\ aorder by `ITBL`.`trans_code`\ d\ alimit 1\ 0

The where cast(`trans_code` as VARCHAR) part, is it missing the type length i.e. where cast(`trans_code` as VARCHAR(255))?

Details:
MariaDB Connector/ODBC: 3.1.20
Power BI Desktop: 2.130.930.0 64-bit (June 2024)

To repro:
Create the following in the MariaDB:

  1. CREATE TABLE sales_order_test (trans_code char(3));
  2. INSERT INTO sales_order_test VALUES('ABC'),('DEF');

Go to Power BI Desktop:

  1. Go to Power BI Desktop -> 'Get data' -> 'MariaDB' -> 'Connect'
  2. Select the sales_order_test db -> 'Load'
  3. Select 'DirectQuery' for Connection Settings
  4. Add the trans_code to 'Filters on this visual'
  5. Filter on 'ABC' value and see the pop up error message.

Note: I have not been able to try this on the v3.2.2 MariaDB Connector, let me know if the newer version has fixed this

Any help would be much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant