Snowflake Integration Guide

Guide to integrating with Snowflake using Direct Connect.

Steps to Integrate with Snowflake

  1. Create a Role
    Begin by creating a role named KUBIT. This role will manage permissions for your integration.

    CREATE ROLE KUBIT;
  2. Generate a Key-Pair
    Follow Snowflake's guide to generate a key-pair. This is essential for secure authentication.

    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
  3. Create a User
    Create a user named KUBIT. Use the password provided by the Kubit team.

    CREATE USER KUBIT RSA_PUBLIC_KEY ='MIIBIjANBgkqh...' DEFAULT_ROLE=KUBIT;
  4. Optional: Share Credentials
    If you require assistance with setup, share your Snowflake account locator, private key, and key password with the Kubit team.

  5. Create a Database
    Establish a database named KUBIT to store your data.

    CREATE DATABASE KUBIT;
  6. Assign Ownership
    Grant the KUBIT role ownership of the KUBIT database. This allows the role to execute tasks exclusive to owners.

    GRANT OWNERSHIP ON DATABASE KUBIT TO ROLE KUBIT;
  7. Create a Data Warehouse
    Set up a data warehouse named KUBIT. Adjust the size based on your data volume. Grant the KUBIT role the necessary privileges.

    CREATE OR REPLACE WAREHOUSE KUBIT WAREHOUSE_SIZE=... INITIALLY_SUSPENDED=TRUE;
    GRANT MONITOR ON WAREHOUSE KUBIT TO ROLE KUBIT;
    GRANT USAGE ON WAREHOUSE KUBIT TO ROLE KUBIT;
    GRANT OPERATE ON WAREHOUSE KUBIT TO ROLE KUBIT;
  8. Set Read-Only Permissions
    Provide the KUBIT role with read-only permissions on the schemas containing views that interface with Kubit. Use SELECT on FUTURE for future-proofing.

Best Practice
Consider creating an additional user role and warehouse for development purposes. This helps isolate development activities from the production environment, minimizing risk.