We have a Database that was created with a case sensitive name in Snowflake called MyDatabase.
CREATE DATABASE "MyDatabase"
To query this database, we have to run a query like:
SELECT * FROM "MyDatabase".PUBLIC.ITEMSTABLE
This query will fail when we query snowflake:
SELECT * FROM MyDatabase.PUBLIC.ITEMSTABLE
In PowerBI when we native query via the Snowflake connector, the error logs indicate that the quotes around MyDatabase are being stripped from the query. We get this error in PowerBI:
And this error in Snowflake:
Inicating that the query making it to snowflake is missing the double quotes around MyDatabase.
See original Stackoverflow thread and comments exploring topic here:
Please reachout if you have further questions.
2 Comments
- v-yingjl
Community Support
Hi tkboisvert ,
Try to query like this:
SELECT * FROM "MyDatabase"."PUBLIC"."ITEMSTABLE"Or refer this blog by using Value.NativeQuery():
Dynamic M Parameters, Snowflake Native SQL And Paginated Reports
Best Regards,
Community Support Team _ Yingjie Li - tkboisvert
Helper II
Hi v-yingjl ,
Thank you for your comment!
I did try that and it does not solve the issue. Same errors in both places.
Note that the blog states: "All this is very much a proof-of-concept and not something I would recommend for production."
When using the nethod outlined in the blog, I get a nearly identical error: