Snowflake - User Guide

In this article, you will understand step by step how to easily integrate with Snowflake

How to Create a User and Role in Snowflake

Execute a query to create user, warehouse and role in Snowflake

  1. Log in to Snowflake using the ACCOUNTADMIN role.

  2. In the bottom-left, click AccountCopy Account URL.

  3. In the left menu, go to Worksheets → open a new worksheet.

  4. Run the following query:

Note: Please make sure you use the ACCOUNTADMIN role when running the query.
-- Create warehouse and custom role CREATE OR REPLACE WAREHOUSE SCYTALE_WH;
CREATE OR REPLACE WAREHOUSE SCYTALE_WH;
CREATE OR REPLACE ROLE SCYTALE_ROLE;
GRANT USAGE ON WAREHOUSE SCYTALE_WH TO ROLE SCYTALE_ROLE;
-- This privilege is needed for some tests
GRANT MONITOR SECURITY ON ACCOUNT TO ROLE SCYTALE_ROLE;

-- Create user
CREATE OR REPLACE USER SCYTALE_USER
DEFAULT_WAREHOUSE = 'SCYTALE_WH'
RSA_PUBLIC_KEY = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0luCbjHkCAY/ixN0OXKr
zDzseD7A9+ZoKn3G9aQAEy51JLA1IwgHu8nsD01tHl453hlFXbQJaDmLqyNBiOOU
w4iIQMex7MuLyxrbaCvgRyzDd+Vw1+AA1kNnFhSri1wrQs0L6LpEVLUCbOML1Tfy
tIUOBNdyLnI98iEoOoP47cG8RwKb6xqubzAr6FrQAjFVMHiEYJ+mc7pEyEC+c6TM
yEx29wgOxbDtXys7tW4iA7v3P0aZBPx46bUqXBeR+8pvqP7Gzu/Mc/aycvod+S3n
faRgh5NOAQOw6o4gNWhvH1ICtTDYvQdDs0Xe7sahBIQM9soOclphLRri/spbRNUy
BQIDAQAB';

 

Note: If you come across this error while executing the query, it indicates that you are not currently in the correct role.

 

How to Assign SCYTALE_ROLE to SCYTALE_USER

Next, we will need to assign the SCYTALE_USER with the appropriate role. This step is crucial to ensure that the user has the necessary permissions.

In the Snowflake sidebar, go to Admin → Users & Roles.

  1. Find SCYTALE_USER and click Edit.

  2. In the "Default Role" field, select SCYTALE_ROLE and save the changes.

 

How to Connect Scytale and Snowflake

  1. In Scytale, go to 'Integrations'.

  2. Search for Snowflake and select 'Connect'.

  3. Paste the Account URL you copied from Snowflake (see instructions above).

  4. Add a connection name – this will be used to differentiate between your connections – and then select 'Next'.

  5. If you executed the setup query without modifying the default user or warehouse names, simply click 'Connect'.

You have now successfully connected to Snowflake!