Supermetrics Support Forum

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

This guide gives instructions on how to successfully authenticate Snowflake. Please note that the data source is available with Google Sheets and Microsoft Excel, and not yet with Data Studio. 


Quick links to specific sections: 

Google Sheets

Excel

"If everything fails..." 

Data Source Access Requirements:

Before authenticating the connector, please make sure you have gone through the rights and permissions required for this data source, meaning you are assigned as an "ad manager/admin" or as a similar role. To learn more, please refer to these guides:

Access requirements for user account:

  • A valid ACCOUNTADMIN user role level is required.
  • To create a Client ID and Client Secret a security integration is required. 

You have two options to authenticate the data source: 

  • You can either connect with OAuth login. To do so, you will need to insert the Client ID, Client Secret, Warehouse, Database name, and Database and schemaIf you have not created those parameters, please see How to create an OAuth Client ID and Client Secret
  • Another option is to connect with API username and secret key. To do so, you will need to insert the Database username, Database password, Hostname, Warehouse, Database name and Database schema.

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 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.


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 Excel:

To re-authenticate Facebook Ads 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.


Refreshing tokens 

As a final step, if you wish your tokens to be refreshed, please create a support ticket.

Did you find it helpful? Yes No

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