Integrating with Snowflake (Small Datasets)
Last updated
Was this helpful?
Last updated
Was this helpful?
To connect Snowflake to Drivetrain, you will need:
Admin privileges in Snowflake
Owners of a user, or users with the SECURITYADMIN role or higher in Snowflake to be able to alter a user (if connecting via key-pair) . For more information, see and .
Admin permissions in Drivetrain.
Execute the below query command to create GCS integration.
Execute the below query to retrieve the Service Account details, get the property_value of "STORAGE_GCP_SERVICE_ACCOUNT" property and store it in a secured document.
Go to Admin → Warehouses in the left navigation section.
We recommend creating a new warehouse to run data transfer queries for Drivetrain. However, you can also choose an existing data warehouse. If Warehouse is not present already, follow the next step to create one
Click on the top right button to create a new warehouse. Choose the Size as per the amount of data you need to query. You can change this later if needed.
Please make a note of the warehouse name. This detail will be needed while creating a user.
We recommend creating a new user. However, you can also choose an existing user. If user is not already present, follow the next step to create one.
To create a user and role, go to Admin → Users & Roles in the left navigation section.
Select the Roles tab and click on the + Role button at the top right to create a custom role. This is an optional step and you can skip this if you already have a relevant role defined
Then click on the + User button at the top right and fill in the details. Please choose the role that you created in the step above. Choose the warehouse that we had created or selected in the previous section as the Default Warehouse. You can also choose some Default Namespace if needed (this is optional).
If you check the checkbox against 'Force user to change password on first time login' then you must activate the user by logging into the new account and changing the password.
To get this, click on the Account name next to the Snowflake icon at the bottom left menu. Mouse hover to the respective Snowflake Account.
Then click on the Copy icon. This will copy the Account Idetifier. This should be something like: ICKXXXX.ACCOUNT_NAME. Please note this as well.
Please go to Data → Databases in the left navigation bar. Select the tables that you want to give permissions for.
Click on the + Privilege icon and then select the role that you had created in the sections above. Choose the default privilege in the Privileges dropdown and click on Grant Privileges.
Execute the below command to provide warehouse access to the role defined in Step 2.
Open a terminal window on your system and type the below command line:
The commands generate a private key in PEM format.
Make a note of this key and store securely. You will need to enter this key on Drivetrain when connecting Drivetrain to Snowflake.
Open the same terminal window on which you ran the command to generate a private key and now run the below command line:
The commands generate a private key in PEM format.
Make a note of this key and store securely.
example_user = username of the account you want to connect to Drivetrain.
Open you Drivetrain account and navigate to the Data tab, click on + New data source.
Search for Snowflake.
Click on Connect.
Choose your preferred method for authentication and click on OK.
Click on Data tab again and you will see a new connection to Snowflake.
Navigate to the new Snowflake connection and click on + Add data.
You will see a list of all available tables. The tables follow the below nomenclature:
Select the tables from which you want to get data into Drivetrain and move them to the right side of the window.
Click Add. That's it! All your relevant data from Snowflake will now be available in Drivetrain for your use.
EXAMPLE_WAREHOUSE = name of the warehouse as per .
EXAMPLE_ROLE = name of the warehouse as per .
Execute an command to assign the public key to a Snowflake user.
Fill all the fields with relevant details of your Snowflake account and click Submit. Follow the steps listed to understand how to get your Snowflake account details such as Username, Warehouse and Database.