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
-
Log in to Snowflake using the ACCOUNTADMIN role.
-
In the bottom-left, click Account → Copy Account URL.
-
In the left menu, go to Worksheets → open a new worksheet.
-
Run the following 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.
-
Find
SCYTALE_USER
and click Edit. -
In the "Default Role" field, select SCYTALE_ROLE and save the changes.
How to Connect Scytale and Snowflake
-
In Scytale, go to 'Integrations'.
-
Search for Snowflake and select 'Connect'.
-
Paste the Account URL you copied from Snowflake (see instructions above).
-
Add a connection name – this will be used to differentiate between your connections – and then select 'Next'.
-
If you executed the setup query without modifying the default user or warehouse names, simply click 'Connect'.
You have now successfully connected to Snowflake!