This guide contains all permissions and requirements for connecting your Snowflake data to Supermetrics.
You can connect to data sources from the Data sources page on the Supermetrics Hub. On the Hub, you can also share an authentication link to connect to a data source you don't have direct access to.
After you connect to the data source on the Hub, you can use the data source connection in the available destinations.
Required permissions
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.
Log in to Snowflake and click SYSADMIN.
- Click Change, and select the ACCOUNTADMIN role.
- Run the following 2 commands in a worksheet:
First command:CREATE SECURITY INTEGRATION
Second command:
"Supermetrics App"
TYPE = OAUTH
ENABLED = TRUE
OAUTH_CLIENT = CUSTOM
OAUTH_CLIENT_TYPE = 'CONFIDENTIAL'
OAUTH_REDIRECT_URI = 'https://supermetrics.com/login-complete'
;SELECT SYSTEM$SHOW_OAUTH_CLIENT_SECRETS('Supermetrics App');
- Click row 1 in the output. You'll find this at the bottom of the screen.
- A popup will open with 3 key-value pairs in JSON format.
- 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.
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.
IP allowlisting
To enable Supermetrics for Snowflake, your database needs to accept connections from the Supermetrics IP addresses. See this article for the IP addresses you need to allowlist.
Query types
You need to select one of the following query types when pulling data:
- 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" option on 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#'
- Use this SQL workaround to use Date Control with this report type:
Note that SQL comments and Snowflake functions aren't supported in SQL-based reports.
Connection instructions
When connecting to Snowflake, you need to log in to Snowflake.
- Select the Snowflake data source on the Supermetrics Hub or in the data destination.
- If prompted, choose to make this connection shared or private.
- Click Start.
- Select an authentication method.
- Enter your credentials and click Start.
- Create an SQL query under Query SQL.
See detailed instructions on how to connect to a data source from the Supermetrics Hub.
You can also connect to Snowflake from these destinations:
- Google Sheets: How to log in to a Supermetrics data source in Google Sheets
- Looker Studio: How to connect data sources to Looker Studio
- Excel: How to connect data sources to Excel with Supermetrics
- Power BI: How to create your first Supermetrics query for Power BI
- The Supermetrics API: How to use the Query Manager