Getting Started - Snowflake

This guide covers the basic functionality of the Supermetrics Snowflake connector, and gives examples of how to set up a query for Google Sheets, Google Data Studio, and Microsoft Excel. 


Quick links to the sections below:

Google Sheets

Google Data Studio

Microsoft Excel

Data Source Access Requirements:

Data Source Access Requirements using oAuth

To enable Supermetrics for Snowflake, you must have a valid ACCOUNTADMIN and you must create a Client ID and Client Secret. To learn more, see How to create an OAuth Client ID and Client Secret. In addition to Client ID and Client Secret, you need hostname, warehouse name, database name and database schema to establish the connection.

Data Source Access Requirements using username and password

To establish a connection using database username and secret key you will need the username, password, hostname, warehouse name, database name and database schema.


IP Whitelist:

To enable Supermetrics for Snowflake, your database needs to accept connections from the following IP: 23.20.234.176


How to create an oAuth Client ID & Client Secret:

To connect Supermetrics to Snowflake using oAuth, you will first need the create the Client ID and Client Secret.


For this, you must have an ACCOUNTADMIN role and you must create a security integration. To do this, please do the following:


1. Login to Snowflake and go to the user icon. Click on change and select the ACCOUNTADMIN role. 


2. Run the following two 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');


The output from these queries will look as below:


4. Click on the output row 1.


5. A popup will open with 3 key-value pairs in JSON format. You will need to copy the values after the keys  “OAUTH_CLIENT_ID” and 

“OAUTH_CLIENT_SECRET”.

You have created your Client ID and Client Secret. 

  • Hostname can be found in the URL when you are logged in to Snowflake. It should end in snowflakecomputing.com.

Warehouse, Database name, and Database schema can be found in Snowflake at the top right of the query editor.


You have completed all the steps for security integration. 


Google Sheets - Query Setup Example:

1. To authenticate the data source, please see:

How to Authenticate/Re-authenticate Snowflake in Google Sheets, Google Data Studio & Microsoft Excel

2. Create SQL query


3. Select columns to sort how you want the results to be ordered by, in the order by field. The ordering affects what results will be left out by the limit.

4. As a last step, click on Get Data To Table.

You have completed all the steps to setup a query.

Google Data Studio - Query Setup Example:

1. To authenticate the data source, please see:

How to Authenticate/Re-authenticate Snowflake in Google Sheets, Google Data Studio & Microsoft Excel

2. Select date range dimension.

2. Select dimensions.

4. Select metrics.


You have completed all the steps to setup a query.


Please note that the default date range and date selection features are not yet available with this data source.


Further Reading

1. As optional, click on add a filter to filter your data.

Google Microsoft Excel - Query Setup Example:

1. To authenticate the data source, please see:

How to Authenticate/Re-authenticate Snowflake in Google Sheets, Google Data Studio & Microsoft Excel

2. Create SQL query. Select columns to sort how you want the results to be ordered by, in the order by field. The ordering affects what results will be left out by the limit.

3. As a last step, click on Get Data.

Further Reading

1. As optional, click on options to filter your data.


Select No header row to delete the header row.


Known issues and limitations

  • SQL comments are not supported in SQL based reports.
  • Snowflake functions are not supported in SQL based reports.

Did you find it helpful? Yes No

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