Snowflake

    Connecting to your Snowflake instance to onverre is simple and secure.

    Step 1. Create a Snowflake OAuth Integration

    Create a Snowflake OAuth integration using the CREATE SECURITY INTEGRATION command.

    ** IMPORTANT **

    Only account administrators (users with the ACCOUNTADMIN role) or a role with the global CREATE INTEGRATION privilege can execute this SQL command.

    In a snowflake worksheet run the security integration command to create an OAuth integration for onverre to use:

    1CREATE OR REPLACE SECURITY INTEGRATION ONVERRE_OAUTH
    2TYPE = OAUTH
    3ENABLED=true
    4OAUTH_CLIENT = CUSTOM
    5OAUTH_CLIENT_TYPE = 'CONFIDENTIAL'
    6OAUTH_ALLOW_NON_TLS_REDIRECT_URI = false
    7OAUTH_REDIRECT_URI = 'https://app.onverre.com/oauth/snowflake/callback';
    8OAUTH_REFRESH_TOKEN_VALIDITY = 7776000

    The command above uses names the integration ONVERRE_OAUTH but you can name it whatever you would like.

    Once you run that command you can view details about the integration using this command (optional):

    1desc integration ONVERRE_OAUTH;

    Step 2. Retrieve OAuth Keys

    You can then retrieve your OAuth keys by running this command:

    1select SYSTEM$SHOW_OAUTH_CLIENT_SECRETS('ONVERRE_OAUTH');

    ** IMPORTANT **
    For the above command, make sure you use all uppercase letters for the integration name (i.e: ONVERRE_OAUTH)

    The output will be a JSON string similar to this:

    1{
    2 "OAUTH_CLIENT_ID": "L/rQiEKNNNKs4YzYgN6kmlfY2IA=",
    3 "OAUTH_CLIENT_SECRET": "jY/H0WEY06t/liPdxdnGMez3mKrWMRN/aIuvZHOUtbc=",
    4 "OAUTH_CLIENT_SECRET_2": "r6AeKr1s/HjJ9pOXphfFlCX/Gr8vNmn69my7UCeUDPI="
    5}

    Step 3. Add your Client ID and Client Secret to your onverre warehouse connection

    After logging in to app.onverre.com, click on the account dropdown -> Warehouse Connection.

    Once on that page select "Add Connection" and choose the Snowflake integration option and fill out that form with your warehouse details.

    Form Fields:

    • Name: This can be any name you choose. Typically this is the url of the website you are tracking data from.

    • Client ID: This is the value for the OAUTH_CLIENT_ID attribute retrieved in Step 2

    • Client Secret: This is the value for the OAUTH_CLIENT_SECRET or OAUTH_CLIENT_SECRET_2 attribute retrieved in Step 2

    • Account URL: This is the fully qualified domain for your snowflake instance i.e https://<instance-id>.us-east-1.snowflakecomputing.com

    • Warehouse: This is the snowflake warehouse, which can be found by navigating to Admin -> Warehouses in the snowflake dashboard. This is typically COMPUTE_WH

    • Database: This is the snowflake database which onverre will connect to. , which can be found by navigating to Data -> Databases in the snowflake dashboard i.e. RUDDER_EVENTS

    • Schema: This is the database schema which onverre will connect to. , which can be found by navigating to Data -> Databases, choosing the correct database and then selecting Schemas in the snowflake dashboard i.e. WEBSITE

    • Role: This is the role that onverre will use when connecting to Snowflake i.e. RUDDER

    Step 4. Perform the OAuth flow

    Once you have added the connection info click on Save Connection. This will start the OAuth flow and you will then need to log in and allow onverre access to your newly create OAuth integration.

    ** IMPORTANT **

    You can't login to Snowflake with a user account  that has one of these roles during the OAuth flow.

    1. ACCOUNTADMIN

    2. ORGADMIN

    3. SECURITYADMIN

    4. SYSADMIN

    After you authorize onverre, you should be redirected back to your onverre dashboard. After this, onverre will start importing aggregated data for you dashboard metrics.

    Updated at: Aug 10 2023