> ## Documentation Index
> Fetch the complete documentation index at: https://docs.isotopes.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Snowflake Connector

## Overview

Connecting Snowflake to aidnn lets you analyze warehouse data live alongside the rest of your sources. Setup runs in two parts: first your Snowflake admin provisions a dedicated read-only role, service user and Personal Access Token (PAT) in Snowflake, then you enter those credentials in aidnn and pick which databases to sync.

## 1. Prerequisites - Snowflake admin setup

This section runs entirely in Snowflake. It uses a fictitious organization “AcmeCorp” with database ACMECORP\_PROD and warehouse ANALYSIS\_WH substitute your own names. You’ll need a Snowflake role with permissions to create roles, users, grants, and PATs (typically ACCOUNTADMIN or an equivalent admin role).

### Create the read-only role and grant database access

Create a dedicated read-only role and grant USAGE/SELECT on existing and future objects in the database, so the role keeps working as the schema evolves.

```sql theme={null}
-- Optional: Check if grants already exist for the role
SHOW GRANTS ON ROLE AIDNN_READONLY_ROLE;

-- Create the dedicated read-only role
CREATE ROLE AIDNN_READONLY_ROLE;

-- Grant USAGE on the ACMECORP_PROD database
GRANT USAGE ON DATABASE ACMECORP_PROD TO ROLE AIDNN_READONLY_ROLE;

-- Grant USAGE on all existing schemas in the ACMECORP_PROD database
GRANT USAGE ON ALL SCHEMAS IN DATABASE ACMECORP_PROD TO ROLE AIDNN_READONLY_ROLE;

-- Grant SELECT on all existing tables in the ACMECORP_PROD database
GRANT SELECT ON ALL TABLES IN DATABASE ACMECORP_PROD
    TO ROLE AIDNN_READONLY_ROLE;

-- Grant SELECT on all existing views in the ACMECORP_PROD database
GRANT SELECT ON ALL VIEWS IN DATABASE ACMECORP_PROD
    TO ROLE AIDNN_READONLY_ROLE;

-- Grant USAGE on FUTURE schemas created in the ACMECORP_PROD database
GRANT USAGE ON FUTURE SCHEMAS IN DATABASE ACMECORP_PROD
    TO ROLE AIDNN_READONLY_ROLE;

-- Grant SELECT on FUTURE tables created in the ACMECORP_PROD database
GRANT SELECT ON FUTURE TABLES IN DATABASE ACMECORP_PROD
    TO ROLE AIDNN_READONLY_ROLE;

-- Grant SELECT on FUTURE views created in the ACMECORP_PROD database
GRANT SELECT ON FUTURE VIEWS IN DATABASE ACMECORP_PROD
    TO ROLE AIDNN_READONLY_ROLE;
```

## Create the service user

Create a service account user that aidnn will authenticate as.

```sql theme={null}
CREATE USER AIDNN_SERVICE_USER
  PASSWORD = 'StrongPassword123!';
```

Attach a network policy so this user can accept connections from aidnn:

```sql theme={null}
ALTER USER AIDNN_SERVICE_USER SET NETWORK_POLICY = 'ALLOW_ALL_POLICY';
```

## Grant the role to the user and grant warehouse access

Assign the read-only role to the service user, and grant USAGE on the warehouse the role will run queries against.

```sql theme={null}
-- Grant the role to the service user
GRANT ROLE AIDNN_READONLY_ROLE TO USER AIDNN_SERVICE_USER;
-- Grant USAGE on the analysis warehouse to the read-only role
GRANT USAGE ON WAREHOUSE ANALYSIS_WH TO ROLE AIDNN_READONLY_ROLE;
```

### Create the Personal Access Token (PAT)

aidnn authenticates with a PAT scoped to AIDNN\_SERVICE\_USER and AIDNN\_READONLY\_ROLE. You can create it through the Snowflake UI or with SQL:

```sql theme={null}
ALTER USER AIDNN_SERVICE_USER ADD PAT aidnn_readonly_pat
    ROLE_RESTRICTION = 'AIDNN_READONLY_ROLE'
    DAYS_TO_EXPIRY = 30
    COMMENT = 'PAT for readonly access for Aidnn service user';
```

## 2. Add the Snowflake connector in aidnn

### Open the Connectors page

From the aidnn home screen, click **Connectors** in the left sidebar.

<Frame>
  <img src="https://mintcdn.com/isotopesai-e9db0a5b/H9ygp89-7shYHgdw/images/SCR-20260430-ohok.png?fit=max&auto=format&n=H9ygp89-7shYHgdw&q=85&s=a6aae92ff05dde50a39aad11e9a99bea" alt="SCR 20260430 Ohok" width="2696" height="1256" data-path="images/SCR-20260430-ohok.png" />
</Frame>

### Start a new connector

Click **Add New Connector** in the top-right corner. You’ll see a grid of every available connector grouped by category.

### Pick Snowflake

Under **Databases**, choose **Snowflake**. This opens the **Add New Snowflake Service** page.

## 3. Fill in the connector details

The Add New Snowflake Service form has two parts: identification (name, description) and credential configuration.

### General fields

* **Name** -  Any descriptive name, this is what shows up as the connector name once setup is complete (for example, “Snowflake – ACMECORP\_PROD”).
* **Description** - Useful when you connect more than one Snowflake account or warehouse.

<Frame>
  <img src="https://mintcdn.com/isotopesai-e9db0a5b/H9ygp89-7shYHgdw/images/SCR-20260430-ojap-1.png?fit=max&auto=format&n=H9ygp89-7shYHgdw&q=85&s=adaaf989d98d5870459651871125d77a" alt="SCR 20260430 Ojap 1" width="1806" height="1320" data-path="images/SCR-20260430-ojap-1.png" />
</Frame>

### Credential configuration

* **Username** - the Snowflake user aidnn authenticates as (the AIDNN\_SERVICE\_USER you created in section 1).
* **Account** - your Snowflake account identifier (for example, [xy12345.us](http://xy12345.us)-east-1). This identifies the Snowflake account aidnn connects to.
* **Warehouse** - the virtual warehouse aidnn runs queries against (for example, ANALYSIS\_WH).
* **Password** - paste the Personal Access Token (PAT) here, not the user’s Snowflake login password.
* **Advanced Configuration Options** - optional, typically not needed unless your username and PAT are scoped to a specific role or default database. If they are, ask your Snowflake admin for those values.

<Frame>
  <img src="https://mintcdn.com/isotopesai-e9db0a5b/H9ygp89-7shYHgdw/images/SCR-20260430-oplb.png?fit=max&auto=format&n=H9ygp89-7shYHgdw&q=85&s=a8441ba5bb87f103cd75b8b2a9a899d9" alt="SCR 20260430 Oplb" width="1804" height="1118" data-path="images/SCR-20260430-oplb.png" />
</Frame>

## 4. Test the connection

Click **Test Connector** to verify aidnn can authenticate and reach Snowflake. The test runs four checks:

* **Account validity** — the account identifier resolves to a reachable Snowflake account.
* **User credentials** — the username and PAT authenticate successfully.
* **Warehouse access** — the role can use the named warehouse.
* **Required permissions** — the role can list databases and read schemas/tables/views.

Any failures surface in the test output before you save the connector.

<img src="https://mintcdn.com/isotopesai-e9db0a5b/H9ygp89-7shYHgdw/images/SCR-20260430-otgb.png?fit=max&auto=format&n=H9ygp89-7shYHgdw&q=85&s=ef0dafc0b495973987f320ea61b76b8d" alt="SCR 20260430 Otgb" title="SCR 20260430 Otgb" style={{ width:"77%" }} width="1252" height="910" data-path="images/SCR-20260430-otgb.png" />

## 5. Create the connector and sync

### Step 1 - Click Add

Once the test passes, click **Create** to create the connector. aidnn saves it and takes you to the connector detail page, which shows the configuration you entered.

<Frame>
  <img src="https://mintcdn.com/isotopesai-e9db0a5b/H9ygp89-7shYHgdw/images/SCR-20260430-ouex.png?fit=max&auto=format&n=H9ygp89-7shYHgdw&q=85&s=1d1f9b5c988f8e06f131b970e7e447dc" alt="SCR 20260430 Ouex" width="1806" height="868" data-path="images/SCR-20260430-ouex.png" />
</Frame>

### Step 2 - Click Sync now

On the detail page, click **Sync now** to start syncing metadata.

<Frame>
  <img src="https://mintcdn.com/isotopesai-e9db0a5b/H9ygp89-7shYHgdw/images/SCR-20260430-ouvq.png?fit=max&auto=format&n=H9ygp89-7shYHgdw&q=85&s=fb9e5961c242e826e7f0f59b953d5eec" alt="SCR 20260430 Ouvq" width="2376" height="1246" data-path="images/SCR-20260430-ouvq.png" />
</Frame>

### Step 3 - Pick the database to sync

In the **Sync Metadata** panel, select the database (or databases) you want to make available through this connector. This determines which schemas, tables, and views aidnn pulls metadata for.\
Click **Sync now** in the bottom-left of the panel to kick off the sync.

<img src="https://mintcdn.com/isotopesai-e9db0a5b/H9ygp89-7shYHgdw/images/SCR-20260430-owds.png?fit=max&auto=format&n=H9ygp89-7shYHgdw&q=85&s=699db6973c23381893a70941ada57789" alt="SCR 20260430 Owds" title="SCR 20260430 Owds" style={{ width:"45%" }} width="974" height="942" data-path="images/SCR-20260430-owds.png" />

### Step 4 - Watch the workflow

Once the sync starts:

* The run enters the workflow state and shows current progress.
* You can monitor each step as it runs.
* When it finishes, the status flips to Completed and the connector is ready to use.

<Frame>
  <img src="https://mintcdn.com/isotopesai-e9db0a5b/H9ygp89-7shYHgdw/images/SCR-20260430-oxrp.png?fit=max&auto=format&n=H9ygp89-7shYHgdw&q=85&s=94a2790a2a80af259b3b7eabcaee7816" alt="SCR 20260430 Oxrp" width="2344" height="916" data-path="images/SCR-20260430-oxrp.png" />
</Frame>

## 6. Manage your Snowflake connectors

### Archive a connector

On the Connectors page, click the connector you want to archive. In the connector detail view, click the kebab menu (⋮) in the top-right and select **Archive**. This archives the entire connector and removes it from active use  existing notebooks that reference it will lose access.

## Support

Please reach out to your Snowflake Admin or [support@isotopes.ai](mailto:support@isotopes.ai) for more details if you face any issues.
