Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Import data from MariaDB with text filter raises SQL syntax error (Reproducible!)

Hi,
I'm using PowerBI (version 2.92.706.0, 64-bit) and MariaDB as data source. I downloaded ODBC driver versions 3.1.11 from following link:
https://mariadb.com/downloads/?showall=1&tab=connectors&group=mariadbconnectors&product=ODBC%20conne...
 
Connection & Simple import job worked well. But when I add text filtering (equality check) in Power Query Editor, it raises SQL syntax error like this:
 
[ma-3.1.11][10.3.25-MariaDB-0ubuntu0.20.04.1-log]You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LONG VARCHAR) = ? and `PARTNERS` is not null' at line 11
 
PARTERS is the column name which I add filter to.
 
It's very easy to reproduce the problem. In MariaDB just create a table like this:
 
create table test (name varchar(256), score int(11));
 
then, insert two rows:
 
insert into test values ('john', 90);
insert into test values ('nick', 80);
 
To get data from MariaDB in PowerBI, import 'test' table then click  'transform data'. In resulting Power Query Editor, add text filter for name 'nick'. Then close & load.
 
That's all, I hope you could reproduce the problem, and fix it SOON!
(In my opnion, it's related with length of VARCHAR. VARCHAR(10) column did not raised the problem)
 
Best.

Status: New
Comments
al358
Frequent Visitor

I too have a similar error when I convert a number field to text in Query Editor:

 

OLE DB or ODBC error: [Permission Error] [ma-3.1.14][10.2.25-MariaDB-log]You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'VARCHAR) as `C1`, `order_details`, `old_status_id`, `old_status_d' at line 2.

 

al358_0-1636798997047.png

 

Hopefully someone can post here if/when this is resolved. I'll do the same.

 

TheBishopEmpire
Frequent Visitor

I am getting this same error. I'm comparing MySQL vs MariaDB connectors within PowerBI. Both connectors are using the same login credentials and MySQL connector retrieves the data the MariaDB throws this error. I'm using MariaDB version 3.1.17

 

TheBishopEmpire_1-1663627471607.png

 

 

OLE DB or ODBC error: [Permission Error] [ma-3.1.17][10.3.34-MariaDB-0ubuntu0.20.04.1]You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SMALLINT) = `ITBL`.`RefCode` and `OTBL`.`Revtype7` is not null) ...' at line 365.

 

TheBishopEmpire_0-1663627424101.png