Open navigation

Snowflake connection guide

Follow these steps to connect your Snowflake data to Supermetrics and use your data in our data destinations — Google Sheets, Looker Studio, Excel, and Power BI, as well as the Supermetrics API. You can also connect to data sources from the Supermetrics Hub.


You can share your data source connection with your team and use the connection across all data destinations you use with Supermetrics. Learn more about shared connections.


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
  • 34.48.0.128/26


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

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. Choose to make this connection shared or private.
  6. Select an authentication method.
  7. Enter your credentials and click Start.
  8. Create an SQL query under Query SQL.

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

Looker Studio
  1. Open the Supermetrics Looker Studio data source gallery.
  2. Navigate to Snowflake and click Start free trial.
  3. You'll see two buttons that read Authorize. If you're using Supermetrics for the first time, click the left-hand one and log in with the Google Account you use with Supermetrics.
  4. Once that's done, or if you've done it before, click the right-hand Authorize button (under "Snowflake requires authorization to connect to data").
  5. Select a team that has access to the account you want to connect.
  6. Choose to make this connection shared or private.
  7. Select an authentication method.
  8. Enter your credentials and click Start.
  9. Select a query type and click Next.
  10. Create an SQL query under Query SQL or select your database table under Tables.
  11. In the pane's top right, click Connect.
  12. Click Create report.
  13. Click Add to report.

Learn about advanced settings, best practices, and troubleshooting tips for Supermetrics for Looker Studio.

Excel

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

  1. Open an Excel file.
  2. Click DataShow Supermetrics.
  3. Under Data source, select Snowflake.
  4. Choose to make this connection shared or private.
  5. Select an authentication method.
  6. Enter your credentials and click Start.
  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 Excel.

Power BI
  1. Log in to the Supermetrics Hub.
  2. In the sidebar, go to DestinationsPower BI.
  3. Click Create or edit queries.
  4. Click Select a data source.
  5. Select the Snowflake data source.
  6. Select an authentication method.
  7. Enter your credentials and click Start.
  8. Fill in the query details.
  9. Click Run query to test your query.
The Supermetrics API
  1. Log in to the Supermetrics Hub.
  2. In the sidebar, click API.
  3. Select for Supermetrics API from the dropdown menu next to the page title.
  4. Click Select data source.
  5. Select the Snowflake data source.
  6. Select an authentication method.
  7. Enter your credentials and click Start.
  8. Fill in the query details. See detailed instructions on how to set up a Supermetrics API query in Query Manager.
  9. Click Run to test your query.
Supermetrics Hub
  1. Log in to the Supermetrics Hub.
  2. In the sidebar, click Data sources.
  3. Scroll down to the list of data sources you haven't connected to. You see this list below your existing connections, under the title Connect to new data source.
  4. Hover over the Snowflake data source, and click Connect.
  5. Select an authentication method.
  6. Enter your credentials and click Start.


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.