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

This guide gives instructions on how to successfully authenticate Snowflake. 


Quick links to specific sections: 

Google Sheets

Data Studio

Excel

"If everything fails..." 

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, you will first need the create the following parameters:

Client ID, Client Secret, Warehouse, Database name, and Database schema.


For this, an ACCOUNTADMIN role and the security integration steps are required. 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. 

Authenticating with Google Sheets

To authenticate Snowflake in Google Sheets, please do the following steps:
1. Open up the Supermetrics sidebar in your Google Sheets.

2. Select Snowflake in the sidebar, under data source.

3. An automatic Snowflake Ads login page will open up.

You have two options to authenticate the data source:

  • One option is to connect with OAuth login. To do so, insert the Client ID, Client Secret, Warehouse, Database name, and Database schema and click on start. If you have not created those parameters, please see How to create an OAuth Client ID and Client Secret. 
    Or

  • Another option is to connect with API username and secret key. To do so, insert the Database username, Database password, Hostname, Warehouse, Database name, Database schema, and click on start.


    4. Click on allow. If you wish to learn more about data security and data privacy, please see this page.

    5. Insert your username and password and click on log in.

    6. You have completed all the steps. You can now go back to the sidebar and select your Snowflake account under data source.


Re-authenticating with Google Sheets:

To re-authenticate Snowflake in Google Sheets, please go to this guide.

Authenticating with Data Studio:

To authenticate Snowflake in Google Data Studio, please do the following steps:
1. Click on add data.
2. Search for Snowflake by Supermetrics and click on it.

3. Click on Authorize. If you wish to learn more about data security and data privacy, please see this page.


4. An automatic popup will open, choose a Google account to sign in.

5. Click on Allow. If you wish to learn more about data security and data privacy, please see this page.



6. Click one last time on Authorize. If you wish to learn more about data security and data privacy, please see this page.

7. You have two options to authenticate the data source.
You can connect with oAuth or with API username and secret key.

  • One option is to connect with OAuth login. To do so, insert the Client ID, Client Secret, Warehouse, Database name, and Database schema and click on start. If you have not created those parameters, please see How to create an OAuth Client ID and Client Secret.
    Or

  • Another option is to connect with API username and secret key. To do so, insert the Database username, Database password, Hostname, Warehouse, Database name, Database schema, and click on start.


4. Click on allow. If you wish to learn more about data security and data privacy, please see this page.


5. Insert your username and password and click on log in

6. Click on the link below to authenticate your user account.

With this link, you can also add or delete users. 

7. Click on OK, let's continue to continue with that user. If you wish to log in with a different user, click on Add Snowflake user account. Click on remove to remove the user account.

- If your Data Studio account belongs to multiple teams, you will see the option to select the team you wish to use. Go to the link below and select the team name with your license to proceed. (If you only belong to one team, skip to the next step).

7. Choose query type and click on next

Please note that you can choose between two queries:

- Database table based report: where you select a table from a schema and you can use the columns of that table as the fields in Data Studio.

- Database based report: build a SQL query that will be used to create report fields. With the SQL query, you can combine data from several tables and even from tables that are in different schemas.

8. If you choose as query type database table based report, select database table. All the other filters are optional. 

- The field "Order field/column" defines the column name you want to use to sort your table/data by. This is important in case your snowflake table has more rows than you intend on selecting. This field only affects database table-based reports. 

9. If you choose as query type database query report, select DB connection. All the other filters are optional.

10. Click on add on the bottom right side to continue. 

11. As a final step, click on add to report


Re-authenticating with Data Studio:

To re-authenticate Snowflake in Data Studio, please go to this guide.

Authenticating with Excel:

To authenticate Snowflake in Excel, please do the following steps:

1. Click on data and open up the Supermetrics sidebar in Excel.

2. Select Snowflake in the sidebar under data source.

3. An automatic Snowflake Ads login page will open up. 

You have two options to authenticate the data source: 


  • One option is to connect with OAuth login. To do so, insert the Client ID, Client Secret, Warehouse, Database name, and Database schema and click on start. If you have not created those parameters, please see How to create an OAuth Client ID and Client Secret
    Or

Another option is to connect with API username and secret key. To do so, insert the Database username, Database password, Hostname, Warehouse, Database name, Database schema, and click on start.
You have completed all the steps. You can now go back to the sidebar and select your Snowflake account under data source.

Re-authenticating with Excel:

To re-authenticate Snowflake in Excel, please go to this guide.

"If everything fails..." 

Common errors:

If you encounter any of the following errors below, please see the guide linked after the error message.

  • Error: "This was a reauthorization request for user X but logged in as user Y", please see this guide
  • Error: "You're not allowed to run queries with this license #12345. This is because you have not been assigned to the license as a valid user." please see this guide.
  • Error: "This action is not supported when you are signed into multiple accounts". please see this guide.
  • If you no longer see a specific account/page/etc. when logging in, please see this guide
  • If you haven't managed to authenticate you might be affected by an issue at Google account management. For more information, please see this guide.

Forcing a refresh per account data & removing a data source:

To force a refresh per data source, please see this guide.

To remove a data source from Google Sheets, please see this guide.

To remove a data source from Data Studio, please see this guide.

To remove a data source from Excel, please see this guide.


Further assistance 

If you followed all the above steps and you still encounter an authentication error, please create a new support request with the details of the issue and we will assist you.


Did you find it helpful? Yes No

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