> AI agents: this is one page from Mammoth Analytics documentation. The index of all pages as Markdown is https://mammoth.io/docs/llms.txt. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get Markdown.

# Connect Snowflake to Mammoth and import tables or SQL

> Connect Mammoth to Snowflake with your account, warehouse and role, grant the minimum permissions, query tables with SQL and save a refreshing dataset.

The Snowflake connector imports a table from any schema, or the result of your own SQL query, from your Snowflake data warehouse into Mammoth as a dataset. Open it from **Data Library** > **New dataset** > **Connectors** and search for **Snowflake**. Project Admins create the connection; Project Editors can start datasets from a connection the project already has. Which connectors you can add depends on your plan.

## What you can bring in from Snowflake

- Any table the role can read, grouped by schema.
- The result of your own `SELECT` query.

AI query writing (**Write SQL**) isn't available for Snowflake. The dataset can refresh daily or only when you ask.

## Before you connect Snowflake

You need:

- A Snowflake account with a warehouse and the database you want to query.
- A Snowflake user and role with `USAGE` on the warehouse and database, and `SELECT` on the schemas and tables you want.
- Your Snowflake **Host URL**, **Username**, **Password**, **Database**, **Warehouse**, **Account** and **Role Name**. All are required.
- Mammoth's IP address added to your Snowflake network policy, if your account uses one. See [Allow Mammoth through your firewall](https://mammoth.io/docs/learn/get-data-in/network-requirements/).

### Grant the minimum Snowflake permissions

```sql
GRANT USAGE ON WAREHOUSE COMPUTE_WH TO ROLE MAMMOTH_ROLE;
GRANT USAGE ON DATABASE ANALYTICS_DB TO ROLE MAMMOTH_ROLE;
GRANT USAGE ON ALL SCHEMAS IN DATABASE ANALYTICS_DB TO ROLE MAMMOTH_ROLE;
GRANT SELECT ON ALL TABLES IN DATABASE ANALYTICS_DB TO ROLE MAMMOTH_ROLE;
```

### Find your Snowflake account identifier

Your account identifier usually has the form `organization-account`, for example `acme-analytics`. Your account URL is the identifier followed by `.snowflakecomputing.com`, for example `acme-analytics.snowflakecomputing.com`.

## Connect Snowflake to Mammoth

These steps follow the shared flow in [Connect a database or app](https://mammoth.io/docs/learn/get-data-in/connect-a-source/).

1. Go to the **Data Library** and click **New dataset**.
2. Choose **Connectors**.
3. Search for **Snowflake** and click its tile. The connection form opens.
4. Fill in the fields below.
5. Click **Connect**. Mammoth checks the details and saves the connection. If the check fails, the error appears at the bottom of the form.

![Snowflake - New Connection form with Host URL, Username, Password, Database, Warehouse, Account and Role Name](https://mammoth.io/docs/images/20261102_snowflake-connection-form.webp)

| Field | What to enter | Example |
| --- | --- | --- |
| **Host URL** | Your Snowflake account URL | `myorg-myaccount.snowflakecomputing.com` |
| **Username** | Snowflake user | `mammoth_reader` |
| **Password** | Password for the Snowflake user | |
| **Database** | Name of the Snowflake database | `ANALYTICS_DB` |
| **Warehouse** | Virtual warehouse that runs the queries | `COMPUTE_WH` |
| **Account** | Your Snowflake account identifier | `myorg-myaccount` |
| **Role Name** | Role to use; it must have table access | `MAMMOTH_ROLE` |

Once connected, the connector workspace opens on your tables.

## Query a Snowflake table in the SQL view

1. In **Tables**, click a table. Mammoth opens its rows with the `SELECT *` query that read them, shown above the rows.
2. To change the query, click **Edit SQL**, edit it, and click **Run** (or press Ctrl+Enter).
3. To keep only some columns, tick them in the table header.

```sql
SELECT order_id, customer_id, amount, order_date
FROM ANALYTICS_DB.SALES.ORDERS
WHERE order_date >= DATEADD(day, -90, CURRENT_DATE())
  AND status = 'COMPLETED'
```

[Connect a database or app](https://mammoth.io/docs/learn/get-data-in/connect-a-source/) covers the full SQL view.

## Save Snowflake data as a dataset

1. Click **Save as dataset**.
2. Enter a **Name** and choose a folder under **Save in**.
3. Under **Keep it up to date**, choose **Daily at 06:00** or **Only when I ask**.
4. Under **On each refresh**, click **Change** and pick what a refresh does (see the table below).
5. Click **Save as dataset**. When the dataset is ready, click **Open dataset**.

| On each refresh | What it does |
| --- | --- |
| **Replace all rows** | Matches the source after every refresh. This is the default. |
| **Add only new rows** | Keeps what you have and adds rows above the last value of a **Key column** |
| **Keep only the newest rows** | Empties the dataset, then brings in rows since the last refresh (needs a **Key column**) |
| **Add every row again** | Shown when the query has no column that can serve as a key column, so each refresh adds a full copy |

## Refresh Snowflake data on a schedule

Choosing **Daily at 06:00** creates a [Dataset Refresh](https://mammoth.io/docs/learn/automate/refresh-a-dataset/) automation for the dataset. To run it on another schedule, edit that automation. For a dataset saved with **Only when I ask**, create a Dataset Refresh automation yourself.

After you save, you can change what a refresh does in the dataset's **Update method** setting. It offers **Replace all data**, **Add new rows only** and **Keep only the newest rows**.

## Allow Mammoth in your Snowflake network policy

If your Snowflake account has a network policy that restricts IP access, add Mammoth's IP address to that policy's allowed IP list in Snowflake. The connection form shows the address to allow.

## Troubleshoot Snowflake authentication

| Symptom | Likely cause | Fix |
| --- | --- | --- |
| Authentication fails | The **Account** value is wrong | Enter your account identifier exactly, without the `.snowflakecomputing.com` suffix |
| Authentication fails or tables are missing | The role lacks access | Check the role has access to the warehouse, database and schemas |
| Connection is refused | A network policy blocks Mammoth | Add Mammoth's IP address to the policy |

## Related

- [Connect a database or app](https://mammoth.io/docs/learn/get-data-in/connect-a-source/): the shared connector workspace steps and the full SQL view.
- [Allow Mammoth through your firewall](https://mammoth.io/docs/learn/get-data-in/network-requirements/): the IP address to allow.
- [Manage saved connections](https://mammoth.io/docs/learn/get-data-in/connections/): edit, reuse or delete this connection.
- [Refresh a dataset](https://mammoth.io/docs/learn/automate/refresh-a-dataset/): change when the dataset refreshes.
- [Connector reference](https://mammoth.io/docs/learn/get-data-in/connectors/): every source Mammoth connects to.

---
Source: https://mammoth.io/docs/learn/get-data-in/connectors/snowflake.md · Updated: 2026-11-08
