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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Unable to query case sensitive Snowflake tables

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:

 
 
 
 

tkboisvert_0-1629494820881.png

 

 

And this error in Snowflake:

 

tkboisvert_1-1629494830909.png

 

 

Inicating that the query making it to snowflake is missing the double quotes around MyDatabase.

 

See original Stackoverflow thread and comments exploring topic here:

https://stackoverflow.com/questions/68867215/snowflake-powerbi-native-queries-arent-support-by-this-...

 

Please reachout if you have further questions.

 

 

 

 

Status: New
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:

 

tkboisvert_0-1629686436223.png