Snowflake

🔐 Datafold will need permissions in your Snowflake dataset in order to read your table data. You will need to be a Snowflake admin in order to grant the required permission.

Step 1: Create a user and role for Datafold

A full script can be found at the bottom of this page.

Step 1: Create a user and role for Datafold

It is best practice to create a separate role for the Datafold integration. In this guide, we will refer to the role as DATAFOLDROLE :

CREATE ROLE DATAFOLDROLE;
CREATE USER DATAFOLD DEFAULT_ROLE = "DATAFOLDROLE" MUST_CHANGE_PASSWORD = FALSE;
GRANT ROLE DATAFOLDROLE TO USER DATAFOLD;

To provide column-level lineage, Datafold needs to read & parse all SQL statements executed in your Snowflake account:

GRANT MONITOR EXECUTION ON ACCOUNT TO ROLE DATAFOLDROLE;
GRANT IMPORTED PRIVILEGES ON DATABASE SNOWFLAKE TO ROLE DATAFOLDROLE;

Step 2a: Use password based authentication

Datafold supports username/password authentication, but also key-pair authentication.

ALTER USER DATAFOLD SET PASSWORD = 'SomethingSecret';

You can set the username/password in the Datafold web UI.

Step 2b: Use key-pair authentication

If you want to use key-pair authentication, please follow the steps of Snowflake. The public key will be set to the Snowflake user:

The private key needs to be uploaded to Datafold, and the optional passphrase of the private-key can be set to the user.

Step 3: Create schema for Datafold

Datafold requires a schema that is being used as a scratch surface for performance, and this allows us to keep the data processing inside of the DWH, and only fetch the results back to Datafold.

This is the only schema that Datafold needs write access to.

Step 4: Give the Datafold role access to your Data warehouse

Datafold will only scan the tables that it has access to. The snippet below will give Datafold read access to a database. Make sure to grant access to all the databases that you want to use in Datafold.

IP Whitelisting ->

After setting permissions in your data source, move on to Configuration ->

Full Script

Last updated

Was this helpful?