CreativeDataEU / PowerBITrinoConnector

A Micosoft Power BI Custom Connector allowing you to import Trino data into Power BI.
MIT License
43 stars 16 forks source link

Query fails to load when schema name starts with digits #28

Closed mailyashgoyal closed 1 week ago

mailyashgoyal commented 1 week ago

We are trying to use PowerBITrinoConnextor, When trying to load the tables data on the preview view, I get an error:

image (4)

Trino Error: SYNTAX_ERROR: line 1:5541: mismatched input '.1'. Expecting: ',', '.', 'AS', 'CROSS', 'EXCEPT', 'FETCH', 'FOR', 'FULL', 'GROUP', 'HAVING', 'INNER', 'INTERSECT', 'JOIN', 'LEFT', 'LIMIT', 'MATCH_RECOGNIZE', 'NATURAL', 'OFFSET', 'ORDER', 'RIGHT', 'TABLESAMPLE', 'UNION', 'WHERE', 'WINDOW', <EOF>, <identifier>
Details:
    [List]

This error is caused due to failure to read schema name. Our schema name is a string starting off with digits.

There is a need to surround the catalog name, schema name and table name by double quotes.

The error is not present when I write explicit sql statement with double quotes for the .. at the time of datasource creation on PowerBI. eg: select * from "17faaff9af3ece2d"."00b0f873b2d5c641"."account"

pichlerpa commented 1 week ago

Hey @mailyashgoyal, thanks for pointing this out, we have just fixed it in https://github.com/CreativeDataEU/PowerBITrinoConnector/commit/74b8cd3950f9f5f17bcaf4c0d8b3c547dbf2c115 and updated the .mez file. Please give it a try and let us know. Thanks, Patrick

mailyashgoyal commented 1 week ago

thank you @pichlerpa