mariadb-corporation / mariadb-powerbi

Power BI DirectQuery Connector
https://mariadb.com
3 stars 1 forks source link

Converting datetime to text raises an error #17

Closed carepollo closed 2 years ago

carepollo commented 2 years ago

In power bi, using the mariadb connector downloaded from: https://mariadb.com/downloads/connectors/

this error raises when you convert datetime to text: https://imgur.com/a/dmn6Olx

I have to to this convesion because i have to run a python script and in order to prevent dates column to get into the python script as Microsoft.olbe.time (see: https://stackoverflow.com/questions/51929420/python-script-in-power-bi-returns-date-as-microsoft-oledb-date) it is a must-do step during data modeling.

To reproduce

ilyagithub1 commented 2 years ago

@carepollo

Upgrade your MariaDB Server instance to v10.3 or later. This will fix DATETIME to VARCHAR conversion issue,

CAST function in earlier versions of MariaDB Server does not support VARCHAR as the target type in CAST(expr AS type), see documentation here: https://mariadb.com/kb/en/cast/

MariaDB version in your screenshot was 10.2.31 (just slightly below the minimum required version): Issue-17


Thank you for using MariaDB Power BI Connector.