Open navigation

Snowflake connection guide

Follow this guide to connect your Snowflake data to Supermetrics.


If you need to connect this data source to one of our data warehouse or cloud storage destinations, explore our data warehouse and cloud storage setup guides.


Before you begin

There are 2 ways to authenticate Snowflake: with OAuth, or with a username and password.


To connect with OAuth, you need an account with the Account admin role, plus a client ID and client secret. 


How to create an OAuth client ID and client secret
  1. Log in to Snowflake and click SYSADMIN

  2. Click Change, and select the ACCOUNTADMIN role. 
  3. Run the following 2 commands in a worksheet:
    First command:
    CREATE SECURITY INTEGRATION
    "Supermetrics App"
      TYPE = OAUTH
    ENABLED = TRUE
      OAUTH_CLIENT = CUSTOM
      OAUTH_CLIENT_TYPE = 'CONFIDENTIAL'
      OAUTH_REDIRECT_URI = 'https://supermetrics.com/login-complete'
    ;
    Second command:
    SELECT SYSTEM$SHOW_OAUTH_CLIENT_SECRETS('Supermetrics App');
  4. Click row 1 in the output. You'll find this at the bottom of the screen.
  5. A popup will open with 3 key-value pairs in JSON format. 
  6. Copy the values after the keys OAUTH_CLIENT_ID and OAUTH_CLIENT_SECRET. These are your client ID and client secret — keep them safe.

To connect with a username and password, you need a database username and secret key with username, password, hostname, warehouse name, database name, and database schema.


How to find your hostname, database name, and database schema

You can find your hostname in the URL when you're logged in to Snowflake. It should end in snowflakecomputing.com.


The warehouse name, database name, and database schema can be found in Snowflake at the top right of the query editor.


Allowlist IP

To enable Supermetrics for Snowflake, your database needs to accept connections from this IP address:

  • 23.20.234.176


Query types

  • Database table-based report: Select a table from a schema, and use the columns of that table as the fields in Looker Studio.
    • Make sure to check the "Warehouse, database name, and schema are case sensitive" optionon the Snowflake login screen to enable this report type to work properly.
    • Date control doesn't work with this report type.
    • If the account you're using has multiple roles and the default role doesn't give it the permissions it needs to retrieve the table list, you might encounter problems getting your full list of tables. Change the account's default role or create a new account with only one role to solve the issue.
  • Database query report: Build an SQL query and use it to create report fields. With the SQL query, combine data from several tables, including those that are in different schemas.
    • Use this SQL workaround to use Date Control with this report type:
      select * from MARKETING.MIX_PBI.GOOGLEADS_AD
      where DATE >= '#start-date#'
      AND DATE <= '#end-date#'

Note that SQL comments and Snowflake functions aren't supported in SQL-based reports.


Instructions

Google Sheets Looker StudioExcel

Make sure you've installed the Supermetrics add-on before you connect.

  1. Open a new Google Sheets file.
  2. Navigate to ExtensionsSupermetricsLaunch sidebar to open Supermetrics.
  3. Click Create new query.
  4. Under Data source, select Snowflake.
  5. Enter your credentials and click Start.
  6. Navigate to Database query.
  7. Create an SQL query under "Query SQL".
  8. Select your countries under "Tables".

Learn about advanced settings, best practices, and troubleshooting tips for Supermetrics for Google Sheets.


More resources

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.