Snowflake
Summary
Item | Description |
---|---|
Release State | General Availability |
Products | Power BI (Semantic models) Power BI (Dataflows) Fabric (Dataflow Gen2) Power Apps (Dataflows) |
Authentication Types Supported | Snowflake (Username/Password), Microsoft account (Microsoft Entra ID) |
Function Reference Documentation | — |
Note
Some capabilities may be present in one product but not others due to deployment schedules and host-specific capabilities.
Capabilities Supported
- Import
- DirectQuery (Power BI semantic models)
- Advanced options
- Specify a text value to use as Role name
- Relationship columns
- Connection timeout in seconds
- Command timeout in seconds
- Database
- Native SQL statement
Connect to Snowflake data warehouse from Power Query Desktop
To make the connection to a Snowflake computing warehouse, take the following steps:
Select Get Data from the Home ribbon in Power BI Desktop, select Database from the categories on the left, select Snowflake, and then select Connect.
In the Snowflake window that appears, enter the name of your Snowflake server in Server and the name of your Snowflake computing warehouse in Warehouse.
Optionally, enter values in any advanced options that you want to use to modify the connection query, such as a text value to use as a Role name or a command timeout. More information: Connect using advanced options
Select OK.
To sign in to your Snowflake computing warehouse, enter your username and password, and then select Connect.
Note
Once you enter your username and password for a particular Snowflake server, Power BI Desktop uses those same credentials in subsequent connection attempts. You can modify those credentials by going to File > Options and settings > Data source settings. More information: Change the authentication method
If you want to use the Microsoft account option, the Snowflake Microsoft Entra ID integration must be configured on the Snowflake side. More information: Power BI SSO to Snowflake - Getting Started
In Navigator, select one or multiple elements to import and use in Power BI Desktop. Then select either Load to load the table in Power BI Desktop, or Transform Data to open the Power Query Editor where you can filter and refine the set of data you want to use, and then load that refined set of data into Power BI Desktop.
Select Import to import data directly into Power BI, or select DirectQuery, then select OK. More information: Use DirectQuery in Power BI Desktop
Note
Microsoft Entra ID Single Sign-On (SSO) only supports DirectQuery.
Connect to a Snowflake database from Power Query Online
To make the connection, take the following steps:
Select the Snowflake option in the connector selection.
In the Snowflake dialog that appears, enter the name of the server and warehouse.
Enter any values in the advanced options you want to use. If there are any advanced options not represented in the UI, you can edit them in the Advanced Editor in Power Query later.
Enter your connection credentials, including selecting or creating a new connection, which gateway you would like to use, and a username and password.
Select Next to connect to the database.
In Navigator, select the data you require, then select Transform data to transform the data in Power Query Editor.
Connect using advanced options
Power Query provides a set of advanced options that you can add to your query if needed.
The following table lists all of the advanced options you can set in Power Query.
Advanced option | Description |
---|---|
Role name | Specifies the role that the report uses via the driver. This role must be available to the user, otherwise no role is set. |
Include relationship columns | If checked, includes columns that might have relationships to other tables. If this box is cleared, you won’t see those columns. |
Connection timeout in seconds | Specifies how long to wait for a response when interacting with the Snowflake service before returning an error. Default is 0 (no timeout). |
Command timeout in seconds | Specifies how long to wait for a query to complete before returning an error. Default is 0 (no timeout). |
Database | Specifies a specific database in the warehouse. This option is only available in Power Query Desktop. |
SQL Statement | For information, go to Import data from a database using native database query. This option is only available in Power Query Desktop. |
Once you've selected the advanced options you require, select OK in Power Query Desktop or Next in Power Query Online to connect to your Snowflake database.
Troubleshooting
Error: SQL compilation error: Object does not exist, or operation cannot be performed
The error occurs when the system can't find the specified object. Often, this error is due to the user having an invalid database name set as their default database.
Ensure that a valid default database name is used for the property DEFAULT_NAMESPACE:
DESC USER
username
To update the default database name: alter user
username
set DEFAULT_NAMESPACE=<database name>.<schema name>
. For more information, see the Snowflake documentation - https://docs.snowflake.com/en/sql-reference/sql/alter-user
Limitations and known issues
Hyphens in database names
If a database name has a hyphen in it, you can encounter an ODBC: ERROR[42000] SQL compilation error
. This issue is addressed in the September 2024 release.
Slicer visual for Boolean datatype
The slicer visual for the Boolean data type isn't functioning as expected in the June 2024 release. This is a known issue. As a temporary solution, users can convert the Boolean data type in their reports to text by navigating to: Transfer -> Data Type -> Text. A fix will be provided in October 2024 release.