Uploaded image for project: 'MariaDB Connector/ODBC'
  1. MariaDB Connector/ODBC
  2. ODBC-428

Power BI visual filter uses incorrect varchar cast query

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 3.1.20
    • None
    • General
    • None
    • MariaDB Connector/ODBC: 3.1.20
      Power BI Desktop: 2.130.930.0 64-bit (June 2024)

    Description

      Hey there, I am not sure this is an issue from Power BI or the ODBC, please let me know if this is not where the issue stems from.

      In Power BI Desktop I am getting the error in the attached image when I try to filter the values on a char type column using MariaDB Connector/ODBC.

      From the trace log this looks to be the query that the filter is executing:

      select `C1`
      from
      (
          select `trans_code`,
              ? as `C1`
          from `sales_order_test`
          where cast(`trans_code` as VARCHAR) = ?
      ) as `ITBL`
      order by `ITBL`.`trans_code`
      limit 1
      

      The where cast(`trans_code` as VARCHAR) part is missing the length?

      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.

      Attachments

        Activity

          People

            Lawrin Lawrin Novitsky
            jjw24 Jeremy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.