---
title: "Snowflake connection guide"
slug: "snowflake-connection-guide"
description: "Connect your Snowflake data to Supermetrics with our guide on permissions, OAuth setup, and data source requirements for seamless integration."
updated: 2026-04-08T10:11:10Z
published: 2026-04-08T10:11:10Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.supermetrics.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Snowflake connection guide

This guide contains all permissions and requirements for connecting your Snowflake data to Supermetrics.

<meta charset="utf-8">

You can connect to data sources from the [Data sources page on the Supermetrics Hub](https://hub.supermetrics.com/token-management). On the Hub, you can also [share an authentication link](https://docs.supermetrics.com/v1/docs/how-to-connect-to-data-sources-from-supermetrics-hub#share-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 [all available destinations](/docs/snowflake-connection-guide#connection-instructions).

## Required permissions

There are two methods to authenticate you Snowflake connection, with OAuth2 or with a key-pair authentication.

### Permissions when connecting with OAuth2

[To connect with OAuth](https://docs.snowflake.com/en/user-guide/oauth-intro), you need the following:

- Snowflake account with the Account admin role
- OAuth client ID and client secret.
- Account/Server URL
- Full table name
- Warehouse name

### Permissions when connecting with a key-pair authentication

To connect with a [key-pair authentication](https://docs.snowflake.com/en/user-guide/key-pair-auth#overview), you need the following:

- Snowflake account with the Account admin role
- Account/Server URL
- Full table name
- Username
- Private key
- Passphrase (enter “none” if the key is not encrypted)
- Warehouse name

Note that these values are case sensitive when connecting to Snowflake connector.

Please also note that the Snowflake table must contain a **DATE** or **DATETIME** column to support date range filtering in Supermetrics. You can identify compatible columns by opening the “Columns” tab of your table in Snowflake and sorting by Type.

## Step 1: Choose either OAuth2 or Key-pair authentication

For the first step, you will need to choose to authenticate the connection using either OAuth2 or a key-pair authentication. Both methods are outlined below, follow only the instructions for your selected method and continue with step 2.

****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:
  1. First command:

`CREATE SECURITY INTEGRATION`

` "Supermetrics App"`

` &nbsp; TYPE = OAUTH`

` &nbsp;ENABLED = TRUE`

` &nbsp; OAUTH_CLIENT = CUSTOM`

` &nbsp; OAUTH_CLIENT_TYPE = 'CONFIDENTIAL'`

` &nbsp; OAUTH_REDIRECT_URI = 'https://supermetrics.com/login-complete' ;`
  2. 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. A popup will open with 3 key-value pairs in JSON format.
5. Copy the values after the keys `OAUTH_CLIENT_ID` and `OAUTH_CLIENT_SECRET`. These are your client ID and client secret — keep them safe.

****How to create your private key and passphrase****

**For encrypted keys (with passphrase):**

1. Use OpenSSL to generate an encrypted private key and public key pair

```bash
openssl genrsa 2048 | openssl pkcs8 -topk8 -v2 des3 -inform PEM -out rsa_key.p8
openssl rsa -in rsa_key.p8 -pubout -out rsa_key.pub
```
2. When prompted, create a passphrase to protect your private key
3. Have an admin with ACCOUNTADMIN role register you public key in Snowflake using this command:

```sql
ALTER USER username SET RSA_PUBLIC_KEY='MIIBIjANBgkqh...';
```
4. To authenticate the connector, use the following value from the private key:
  1. Private key: Copy the entire content of your private key file, including the beginning and end markers: -----BEGIN ENCRYPTED PRIVATE KEY----- to -----END ENCRYPTED PRIVATE KEY-----.
  2. Passphrase: The password you created when generating your private key.

**For unencrypted keys (without passphrase):**

1. Use OpenSSL to generate an unencrypted private key and public key pair

```bash
openssl genrsa 2048 | openssl pkcs8 -topk8 -nocrypt -inform PEM -out rsa_key.p8
openssl rsa -in rsa_key.p8 -pubout -out rsa_key.pub
```
2. Have an admin with ACCOUNTADMIN role register your public key in Snowflake using this command:

```sql
ALTER USER username SET RSA_PUBLIC_KEY='MIIBIjANBgkqh...';
```
3. To authenticate the connector, use the following value from the private key:
  1. Private key: Copy the entire content of your private key file, including the begin and end markers: -----BEGIN PRIVATE KEY----- to -----END PRIVATE KEY-----
  2. Passphrase: enter ‘none’ (case sensitive).

### Step 2: Find your Account/Server URL

1. Log in to Snowflake.
2. In the bottom left, click your username.
3. Hover over **Account** in the menu that appears and click **View account details**.
4. Copy the value for **Account/Server URL**.

### Step 3: Find your full table name

1. Log in to Snowflake.
2. In the left side navigation, click **Catalog** → **Database explorer**.
3. Select the database and schema where your table is located.
4. Select the table you want to fetch data from.
5. Once you are at the selected table the database name, schema, and table name are displayed at the top, separated by slashes in this format: `DATABASE_NAME` / `SCHEMA_NAME` / `TABLE_NAME`
6. Copy these names and enter them in the following format when connecting in Supermetrics: `DATABASE_NAME.SCHEMA_NAME.TABLE_NAME`

### Step 4: Find your warehouse name

1. Log in to Snowflake.
2. In the left side navigation, click **Catalog** → **Database explorer**.
3. Select the database and schema where your table is located.
4. Select the table you want to fetch data from.
5. Open the **Data preview** tab.
6. The warehouse name is visible next to the number of rows. Copy the warehouse name.

## Query types

If prompted, you need to select a query type to pull data.

- **Table**: Fetch data from your table in Snowflake.

## Connection instructions

****When connecting to Snowflakeusing OAuth2****

1. Select the Snowflake data source [on the Supermetrics Hub](https://hub.supermetrics.com/token-management) or in the data destination.
2. If prompted, choose to make this connection [shared or private](https://docs.supermetrics.com/docs/about-shared-and-private-connections).
3. Click **Start**.
4. Complete the OAuth login flow.
5. Create a query by selecting the desired metrics and dimensions.
6. Set a **Date column** under the options tab. Note that the Date column is case-sensitive and required.

****When connecting to Snowflake using a key-pair authentication****

1. Select the Snowflake data source [on the Supermetrics Hub](https://hub.supermetrics.com/token-management) or in the data destination.
2. If prompted, choose to make this connection [shared or private](https://docs.supermetrics.com/docs/about-shared-and-private-connections).
3. Click **Start**.
4. Enter your account URL, table name, username, private key, passphrase, warehouse, and click Start.
5. Create a query by selecting the desired metrics, and dimensions.
6. Set a **Date column** under the options tab. Do note that the Date column is case-sensitive and required.

See detailed instructions on [how to connect to a data source from the Supermetrics Hub](https://docs.supermetrics.com/docs/how-to-connect-to-data-sources-from-supermetrics-hub).

You can also connect to Snowflake from these destinations:

- Google Sheets: [How to connect to a Supermetrics data source in Google Sheets](https://docs.supermetrics.com/docs/how-to-connect-to-a-supermetrics-data-source-in-google-sheets)
- Data Studio: [How to connect data sources to Data Studio](/v1/docs/how-to-connect-data-sources-to-data-studio)
- Excel: [How to connect data sources to Excel with Supermetrics](https://docs.supermetrics.com/docs/how-to-connect-data-sources-to-excel-with-supermetrics)
- Power BI: [How to create your first Supermetrics query for Power BI](https://docs.supermetrics.com/docs/how-to-create-your-first-supermetrics-query-for-power-bi)
- The Supermetrics API: [How to use the Query Manager](https://docs.supermetrics.com/docs/how-to-use-the-query-manager)

## More resources

- [How to reauthenticate a data source in Google Sheets, Data Studio, Excel, or Power BI](https://docs.supermetrics.com/docs/how-to-reauthenticate-a-data-source-connection-in-google-sheets-looker-studio-excel-power-bi-and-supermetrics-hub)
- [How to reauthenticate a data source in data warehouse, API, or cloud storage platform](https://docs.supermetrics.com/docs/how-to-reauthenticate-a-data-source-connection-in-data-warehouse-destinations-or-the-supermetrics-api)
- [How to manage data source connections on the Supermetrics Hub](https://docs.supermetrics.com/docs/how-to-manage-data-source-connections-on-supermetrics-hub)
