Snowflake

Integrate via Direct Connect

Steps

  1. Create a role, name it KUBIT.
    CREATE ROLE KUBIT;
  2. Generate a key-pair (here's Snowflake's full guide for reference)
    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 and name it KUBIT.
    Kubit team will generate and share a password, which you should use to create the user.
    CREATE USER KUBIT RSA_PUBLIC_KEY ='MIIBIjANBgkqh...' DEFAULT_ROLE=KUBIT
  4. (Optional) Share your Snowflake account locator, private key and key password with the Kubit team if you need help setting up your Kubit environment.
  5. Create a database called KUBIT.
    CREATE DATABASE KUBIT;
  6. Make the KUBIT role owner of the KUBIT database. This will allow us to create and execute tasks that are only available to an owner role.
    GRANT OWNERSHIP ON DATABASE KUBIT TO ROLE KUBIT;
  7. Create a Data Warehouse called KUBIT (size depends on your data volume)
    1. Grant the KUBIT role the following privileges: MONITOR | USAGE | OPERATE
      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. Add read-only (SELECT on FUTURE) permissions to the KUBIT role to the schema(s) containing the views interfacing with Kubit.
👍

Best Practice

Create one more user role and warehouse for development purposes in order to isolate the impact on the production environment and avoid accidents.