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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Issue creating a snowflake data source using gateway

Im trying to create a new datasource usign Snowflake type into a gateway, When I run the model Im getting the next error 'ODBC ERROR 22000 Cannnot perform SELECT. This session does not have a current database Call USE DATABASE or use a qualified name' In the settings I didnt see database option to type it I see just 'Server' & Warehouse. So could someone help me with your inputs on this

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @Anonymous ,

 

It sounds like you are trying to connect to a Snowflake database using an ODBC connection and you are encountering an error when you try to run a SELECT statement. The error message indicates that you need to specify a database to use for the connection.

In Snowflake, a database is a logical container for a set of tables and other objects. When you create a connection to a Snowflake account, you need to specify the name of the database that you want to connect to.

To specify the database to use for the connection, you can use the "Database" option in the connection settings. This option is usually located in the same section as the "Server" and "Warehouse" options. You will need to enter the name of the database that you want to connect to in this field.

Alternatively, you can also specify the database to use in your SQL statements by using a qualified name. A qualified name consists of the name of the database, followed by a period (.) and the name of the object (e.g. "database_name.table_name").

 

For example, you could use a statement like this to select data from a table in a specific database:

SELECT * FROM database_name.table_name;


I hope this helps! Let me know if you have any more questions.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi v-henryk-mstf

My apologies but for any reason I dont have the database option when I try to create a new data source On-premises, I selected 'Snowflake' as Data source type, and I have Server and Warehouse options. Here you can find an image that I see. Do you know where database should be?

Melinda_0-1672321952100.png

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.