--- title: "Connect to Snowflake" slug: "connect-to-snowflake" description: "Connect Validatar to Snowflake with key-pair authentication: account, database, warehouse, role and user, then run the public-key script Validatar generates." status: "new" updated: 2026-11-20T21:49:42Z published: 2026-11-20T21:49:42Z canonical: "docs.validatar.com/connect-to-snowflake" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.validatar.com/llms.txt > Use this file to discover all available pages before exploring further. # Connect to Snowflake Connect Validatar to Snowflake with a **Snowflake Driver** data source that signs in with key-pair authentication. You enter the account, database, warehouse, role and user, Validatar generates a key pair, a Snowflake admin runs the script that registers the public key on the user, and you test and save. > **Applies to:** Validatar Cloud ยท Validatar Server When you finish, the Snowflake database is in the Catalog with its schemas, tables and columns, ready to profile and test. Validatar Cloud reaches Snowflake over the internet, so no Data Agent is needed. The example on this page is the **Enterprise Data Warehouse**, the `SAMPLE_DW` database that the Wholesale Distribution System loads into. It connects with key-pair authentication and a read-only role. ## A data source or a processing engine? Snowflake shows up in two places in Validatar, and they do different jobs: | | Snowflake data source | Snowflake data processing engine | | --- | --- | --- | | What it is | A connection to one Snowflake database that Validatar catalogs, profiles and tests | Where Validatar runs comparisons and stores detailed results, inside your Snowflake account | | Where you set it up | **Settings** > **Data Sources** | **Settings** > **Data Processing Engines** | | Connection type | **Snowflake Driver**, or **Snowflake Engine** when it runs through an engine | Not a data source | | Needed for | Every Snowflake database you test | Optional, and licensed. See [Creating a Snowflake Data Processing Engine](/docs/creating-a-snowflake-data-processing-engine). | This page covers the data source. If your team runs a Snowflake processing engine, the section "Connect through a Snowflake processing engine" further down shows what changes. ## Before you start - The **Data Source Admin** role in Validatar. - A Snowflake user for Validatar and a role that can use a warehouse and read the database. Use a custom role: the help next to **Role Name** lists the system-defined roles that cannot be used (ACCOUNTADMIN, SECURITYADMIN, USERADMIN, SYSADMIN, ORGADMIN, GLOBALORGADMIN and PUBLIC). - Someone with the SECURITYADMIN role in Snowflake (or another role that can alter the user) to run the public-key script. - If the connection goes through a Data Agent, agent version 2025.2 or later. Older agents cannot use key-pair authentication. If you do not have a Validatar user and role yet, a Snowflake admin can create them like this. Change the names to your own: ``` -- Read-only role and service user for Validatar on the SAMPLE_DW database. -- Run as SECURITYADMIN, or a role that can create roles and users and grant on SAMPLE_DW. CREATE ROLE IF NOT EXISTS VALIDATAR_READONLY; GRANT USAGE ON WAREHOUSE VALIDATAR_WH TO ROLE VALIDATAR_READONLY; GRANT USAGE ON DATABASE SAMPLE_DW TO ROLE VALIDATAR_READONLY; GRANT USAGE ON ALL SCHEMAS IN DATABASE SAMPLE_DW TO ROLE VALIDATAR_READONLY; GRANT SELECT ON ALL TABLES IN DATABASE SAMPLE_DW TO ROLE VALIDATAR_READONLY; GRANT SELECT ON ALL VIEWS IN DATABASE SAMPLE_DW TO ROLE VALIDATAR_READONLY; -- Future grants, so schemas and tables created later show up at the next ingestion. GRANT USAGE ON FUTURE SCHEMAS IN DATABASE SAMPLE_DW TO ROLE VALIDATAR_READONLY; GRANT SELECT ON FUTURE TABLES IN DATABASE SAMPLE_DW TO ROLE VALIDATAR_READONLY; GRANT SELECT ON FUTURE VIEWS IN DATABASE SAMPLE_DW TO ROLE VALIDATAR_READONLY; -- A service user signs in with a key and never with a password. CREATE USER IF NOT EXISTS VALIDATAR_SVC TYPE = SERVICE DEFAULT_ROLE = VALIDATAR_READONLY DEFAULT_WAREHOUSE = VALIDATAR_WH; GRANT ROLE VALIDATAR_READONLY TO USER VALIDATAR_SVC; ``` ## Create the Snowflake data source 1. Go to **Settings** > **Data Sources** and click **New Data Source**. 2. Enter the **Name** (`Enterprise Data Warehouse`), choose the **Environment** and add a **Description**. 3. In the **Connection** panel, click **Add**. 4. Leave **Processing Engine** on **Built-In Engine: Save results in Local Storage**. 5. Choose **Snowflake Driver** as the **Connection Type**. Validatar selects the **Snowflake** template. 6. Leave **Data Agent Group** on **No Assigned Group**. Choose a group only if your Snowflake account is reachable from your own network and not from the internet. 7. Keep **Key-Pair Authentication** selected. It is the default for a new connection. 8. Fill in **Account Name**, **Database Name**, **Warehouse Name**, **Role Name** and **Username**. 9. Click **View Public Key/Script**. The **Snowflake Public Key** dialog shows the public key and a script that assigns it to your user. 10. Click **Copy Script to Clipboard** and close the dialog. 11. Have a Snowflake SECURITYADMIN run the script in Snowflake. 12. Back in Validatar, click **Test Connection** and wait for **Connection succeeded**. 13. Click **Create Connection**, then **Save**. What each field takes: | Field | Enter | Example | | --- | --- | --- | | **Account Name** | The account identifier, usually `orgname-accountname`. Validatar strips `.snowflakecomputing.com` and turns underscores into hyphens for you. | `<orgname>-<accountname>` | | **Database Name** | The database to catalog and test. One data source covers one database. | `SAMPLE_DW` | | **Warehouse Name** | The warehouse Validatar's queries run on | `VALIDATAR_WH` | | **Role Name** | The read-only role. Not a system role. | `VALIDATAR_READONLY` | | **Username** | The Snowflake user the key is registered on | `VALIDATAR_SVC` | Validatar upper-cases the database, warehouse, role and user names as you type. It stores the private key encrypted in its own repository; only the public key leaves Validatar. [Migrating Snowflake Authentication](/docs/migrating-snowflake-authentication) has more on the keys, including how to rotate them. ### Several data sources, one Snowflake user When another data source or processing engine already uses the same account and user, **Found match** appears next to **Username**. Validatar reuses that key. If the other source already connects with it, the public key is in place: skip the script and go straight to **Test Connection**. **Regenerate Public/Private Keys** makes a new key for every data source and engine that shares the account and user, and the new script has to be run in Snowflake again. ## Add it to a project and ingest 1. On the data source, open **Projects**, check the projects that will test it, and click **Save**. 2. Open **Schema Metadata** and click **Refresh Now**. 3. Wait for the run in **Ingestion History** to finish. The Snowflake template reads the database's `INFORMATION_SCHEMA`: schemas, tables, views with their definitions, and columns with data type, nullability, identity, length, precision and comment. The template does not read primary keys, so Snowflake columns are not marked as keys in the Catalog. Click **Set Refresh Schedule** to keep the catalog in step with new tables. ## Check that it worked - **Metadata Statistics** on **Schema Metadata** shows the schema, table and column counts. - In **Catalog** > **Enterprise Data Warehouse**, the **Schemas** tab lists the database's schemas, including `STAR_SCHEMA`. - Open a table and its **Preview** tab. Rows come back from Snowflake. Next, profile the warehouse: the Enterprise Data Warehouse runs a profile set called Star Schema Profile over every table in `STAR_SCHEMA`. See [Create and Run a Profile Set](/docs/create-and-run-a-profile-set). ## Connect through a Snowflake processing engine If your team has set up a [Snowflake data processing engine](/docs/creating-a-snowflake-data-processing-engine), a Snowflake data source can use the engine's connection instead of its own: 1. In the connection dialog, choose the engine in **Processing Engine**. The **Connection Type** changes to **Snowflake Engine**. 2. Choose the **Database** from the list. It shows the databases the engine's role can read. 3. Leave **Schema** on **Use default schema**, or choose one. 4. Click **Test Connection**, **Create Connection** and **Save**. There are no credentials to enter: the source signs in as the engine's user and role. ### The preview role when data source masking is on A Snowflake Engine connection shows a **Preview Role** field when two things are true: your license includes the **Manage Masking** feature, and a Configuration Admin has turned on **Enable Data Source Masking** under **Settings** > **Configuration** > **Optional Features**. Choose a role whose Snowflake masking policies match what Validatar users may see. The queries behind on-screen data then run as that role: the Catalog **Preview** tab, data set previews in the test editor, and the queries Validatar AI runs. Snowflake applies its masking policies, so masked columns stay masked in Validatar. Tests and profile sets keep running as the engine's role. **Use engine role** turns the preview role off for that data source. ## Do it with Validatar AI > **Do it with Validatar AI** (Validatar Cloud, beta). Open the AI panel and ask: "Create a Snowflake Driver data source named Enterprise Data Warehouse for the SAMPLE_DW database, warehouse VALIDATAR_WH, role VALIDATAR_READONLY and user VALIDATAR_SVC, using the Snowflake template, and add it to the Warehouse Reconciliation project." Review what it creates before you run it. You can undo the change from the chat history. The key pair still needs your hands: open the data source's **Connection** page, click **Edit**, click **View Public Key/Script**, have the script run in Snowflake, then test and save. Never paste keys or passwords into the chat. The AI cannot ingest metadata, so click **Refresh Now** afterwards. ## Troubleshooting | Symptom | Cause | Fix | | --- | --- | --- | | **Test Connection** fails with a JWT authentication error | The public-key script has not run, ran against another user, or ran in another account | Run the script from **View Public Key/Script** as SECURITYADMIN, for the exact user and account in the dialog. | | "Selected data agent doesn't support key-pair auth" | The Data Agent is older than 2025.2 | Upgrade the agent, or clear **Data Agent Group** if Validatar Cloud can reach Snowflake directly. | | An error about the warehouse, or queries that never start | The role has no `USAGE` on the warehouse, or the warehouse is suspended without auto-resume | Grant `USAGE` on the warehouse and turn on auto-resume. | | Ingestion succeeds but schemas or tables are missing | The role lacks `USAGE` on those schemas or `SELECT` on those tables | Grant them (future grants included), then click **Refresh Now**. | | Other data sources broke after you regenerated keys | Regenerating replaces the key for every source and engine that shares the account and user | Run the new script in Snowflake, then test each source. Validate any engine that shares the user. | | The **Preview Role** field is missing | The source uses **Snowflake Driver**, or masking is not licensed and enabled | The preview role applies only to **Snowflake Engine** connections with **Enable Data Source Masking** on. | ## Related - [Create a Data Source](/docs/create-a-data-source) - [Migrating Snowflake Authentication](/docs/migrating-snowflake-authentication) - [Creating a Snowflake Data Processing Engine](/docs/creating-a-snowflake-data-processing-engine) - [Snowflake Data Source Template](/docs/snowflake-data-source-template) - [Create and Run a Profile Set](/docs/create-and-run-a-profile-set) Engineers who script their setup can create Snowflake data sources through the [Validatar MCP server](/docs/connecting-to-the-validatar-mcp-server) and the [Validatar Agent Kits](/docs/validatar-agent-kits). ## Related - [Create a Data Source](/create-a-data-source.md) - [Migrating Snowflake Authentication](/migrating-snowflake-authentication.md) - [Creating a Snowflake Data Processing Engine](/creating-a-snowflake-data-processing-engine.md) - [Ingesting Schema Metadata](/ingesting-schema-metadata.md) - [Create and Run a Profile Set](/create-and-run-a-profile-set.md)