Connecting Looker to Snowflake is a two step process:
- Create a Looker user on Snowflake and provision access.
- Set up a database connection in Looker.
Create a Looker User on Snowflake
We recommend the following commands for creating the Looker user. Make sure to run each line individually.
If you paste the above commands as a batch into the Snowflake connection panel, check the All Queries box to ensure all lines are run. By default, Snowflake runs only lines that are selected:
Adding the Connection
Follow the instructions for connecting Looker to your database, noting a few special settings:
- SSL must be turned on.
- Specify an account and warehouse via JBDC paramaters. Use this format:
account=[account_name]&warehouse=[warehouse_name]The account name is not the same as the database user name. The Snowflake instance account is usually the first part of your Snowflake instance host URL. If your instance URL is
mycompany.snowflake.com, your account name is
- Whitelisting IPs is not required.
- Be sure to include a default schema in the Schema field. You will still be able to query other schemas, but Snowflake expects this parameter in the JDBC string.
- In the Temp Database field, the schema name
LOOKER_SCRATCHshould be in all caps. Snowflake changes the name to all caps on its end, so you can’t connect if you use lowercase in the Looker Connection Settings page.
Here is an example setup:
Snowflake’s Autosuspend Feature
Snowflake warehouses have an autosuspend feature that is enabled by default. After a specified period, the warehouse will autosuspend. If the warehouse is suspended, all queries produce an error. This error is not visible via dashboards (no data is normally shown), but it is visible when querying with the Explore page.
Snowflake also has an autoresume feature that will resume the warehouse when it is queried. However, resuming the warehouse can take up to five minutes, causing queries to hang for five minutes before returning. These features can be configured in the Warehouses tab:
For persistent derived table support, create a Snowflake user for PDTs that has write access to your database and the default schema. In the Looker Connections Settings page, check the Persistent Derived Tables box, and in the PDT Overrides column, enter the username and password of the PDT user. See this documentation page for more information.
Looker’s ability to provide some features depends on whether the database dialect can support them.
In the current Looker release, Snowflake supports the following Looker features:
After you have connected your database to Looker, you’re ready to configure sign-in options for your users.