# Integrate Snowflake with Databox

Snowflake is a cloud-based data platform designed to handle large-scale structured and semi-structured data for analytics and business intelligence. Unlike traditional on-premise data warehouses, Snowflake separates compute and storage, allowing for high performance, scalability, and concurrency without infrastructure management. It supports SQL querying, data sharing, and native support for formats like JSON, Parquet, and Avro. Snowflake is commonly used by organizations for centralized data warehousing, real-time reporting, and seamless integration with BI tools and data pipelines.

## Connection

### Step 1: Create a network rule

You need the `CREATE NETWORK RULE` privilege on the schema to create a network rule. By default, only the `ACCOUNTADMIN` and `SECURITYADMIN` roles, along with the schema owner, have this privilege.

You can create a network rule using Snowsight by following these steps:

1. [Sign in to Snowsight](https://docs.snowflake.com/en/user-guide/ui-snowsight-gs#label-snowsight-getting-started-sign-in) using a role with appropriate admin privileges.
2. Navigate to **Admin > Security**.
3. Open the **Network Rules** tab.
4. Click **+ Network Rule** to create a new rule.
5. Enter a **name** for the network rule.
6. Select the **schema** where the network rule will be stored. *(Note: Network rules are schema-level objects.)*
7. Optionally, add a **comment** to describe the rule for easier management.
8. Set the **Type** to **IPv4**.
9. Set the **Mode** to **Ingress**.
10. Under **Identifiers**, add `52.4.198.118` (Databox IP) **and your own IP address** to ensure you can proceed with the upcoming network policy setup.
11. Click **Create Network Rule** to save it.


create-network-rule
 [Official Documentation](https://docs.snowflake.com/en/user-guide/network-rules#creating-a-network-rule)

### Step 2: Create a network policy

Only security administrators (i.e. users with the `SECURITYADMIN` role) or higher or a role with the global `CREATE NETWORK POLICY` privilege can create network policies. Ownership of a network policy can be transferred to another role.

You can create a network policy using Snowsight by following these steps:

1. [Sign in to Snowsight](https://docs.snowflake.com/en/user-guide/ui-snowsight-gs#label-snowsight-getting-started-sign-in) using a role with appropriate admin privileges.
2. Navigate to **Admin > Security**.
3. Open the **Network Policies** tab.
4. Click **+ Network Policy** to create a new policy.
5. Enter a **name** for the network policy.
6. Optionally, add a **comment** to describe the policy for easier management.
7. Under **Allowed**, click **Select rule**, then choose the network rule you created in [Step 1](#step-1-create-a-network-rule).
8. Click **Create Network Policy** to save it.


create-network-policy
 [Official Documentation](https://docs.snowflake.com/en/user-guide/network-policies#create-a-network-policy)

### Step 3: Activate the network policy

After creating the network policy, you need to apply it to your Snowflake account:

1. [Sign in to Snowsight](https://docs.snowflake.com/en/user-guide/ui-snowsight-gs#label-snowsight-getting-started-sign-in) using a role with appropriate admin privileges.
2. Navigate to **Admin > Security**.
3. Open the **Network Policies** tab and locate the policy you created in [Step 2](#step-2-create-a-network-policy).
4. Click the **... (More)** menu next to the policy and select **Activate On Account**.
5. Click **Activate policy** to confirm the action.


activate-network-policy
### Step 4: Generate a programmatic access token

You can generate a programmatic access token (PAT) using Snowsight by following these steps:

1. [Sign in to Snowsight](https://docs.snowflake.com/en/user-guide/ui-snowsight-gs#label-snowsight-getting-started-sign-in) using a role with appropriate admin privileges.
2. Navigate to **Admin > Users & Roles**.
3. Select the **user** for whom you want to generate the token.
4. Under the **Programmatic access tokens** section, click **Generate new token**.
5. In the **New programmatic access token** dialog, fill in the following fields:
  1. **Name**: Enter a unique name using only letters, numbers, and underscores. It must start with a letter or underscore. All letters are stored in uppercase.
  2. **Comment** (optional): Add a description to help identify the token later. This will appear alongside the token in the list.
  3. **Expires in**: Choose how many days the token should remain valid.
6. If the user is a service user (i.e. the `USER` object has `TYPE=SERVICE`), or if you want to restrict the token's scope, select **One specific role (recommended)**. Then choose the role that should be used for privilege evaluation and object ownership.
  1. When authenticating with this token, the selected role determines which objects the user can access and who owns any objects created.
7. Click **Create Token** to generate it. Make sure to copy the token secret immediately, as it will not be shown again.


generate-pat
 [Official Documentation](https://docs.snowflake.com/en/user-guide/programmatic-access-tokens#generating-a-programmatic-access-token)

### Step 5: Enter your Snowflake connection details in Databox

Once you have an active network policy and a valid programmatic access token (PAT), enter the following connection details in Databox to complete the setup:

- **Name of the data source** (required)  — A label for the data source in Databox.
- **Account identifier** (required) — The [organization and account name](https://docs.snowflake.com/en/user-guide/admin-account-identifier#finding-the-organization-and-account-name-for-an-account) in the format `ORGNAME-ACCOUNT_NAME`.
- **User** (required) — The Snowflake user associated with the PAT.
- **Password or PAT** (required)— The **token secret** from the [generated PAT](#connection-programmatic-access-token) in this field.
- **Role** — Optional. If a specific role was assigned during PAT creation, this field can be left blank.
  - This field is part of a legacy configuration and only applies to Snowflake connections created **before July 2025**.
- **Warehouse** (required) — The virtual warehouse Databox will use to run queries.
- **Database name and schema** (required) — A valid database and schema in the format `DATABASE.SCHEMA`.
  - This setting does **not** limit your access to that specific database or schema. With datasets, Databox can access **any database and schema** the PAT has permission for.
- **Authenticator** — The SSO URL configured in your external identity provider (IdP), such as Okta or Azure AD.
  - This field is part of a legacy configuration and only applies to Snowflake connections created **before July 2025**.
- **Time zone** (required) — The time zone used for interpreting and filtering data points in visualizations.


enter-credentials
## Datasets

The Snowflake integration supports the creation of [datasets](/understanding-datasets), which allow you to define and shape the specific data you want to use for reporting in Databox. Datasets make it easier to focus on the most relevant information, enabling you to filter, visualize, and analyze metrics across projects, teams, and clients without writing complex queries each time.

### Steps to create a dataset:

1. **Select a database**: Choose the Snowflake database that contains the data you want to work with.
2. **Select a schema**: Pick the appropriate schema within that database.
3. **Select columns**: Browse and select the specific columns (fields) from your tables or views to include in your dataset. These columns define the structure and content of your dataset.


### Optional: Write SQL

For more advanced use cases, you can write a **custom SQL query** instead of selecting columns manually. This allows you to:

- Join multiple tables
- Apply filters and aggregations
- Format or transform data before importing it into Databox


Your query must return a valid tabular result to be used as a dataset.

### Additional resources

- [Snowflake Databases, Tables and Views](https://docs.snowflake.com/en/guides-overview-db) — Official Snowflake documentation on how to work with databases, schemas, tables, and views.
- [Snowflake Queries](https://docs.snowflake.com/en/guides-overview-queries) — Snowflake's guide to writing and optimizing SQL queries, including functions, joins, and filtering best practices.


## Resources

For comprehensive details on metrics, data availability, templates, specifications, usage guidelines, and other key information, refer to the resources listed below.

In 2025, we introduced **dataset support** for Snowflake. You can now import raw data from your Snowflake account into a reusable [dataset](/create-a-dataset) and build multiple metrics from it using the [metric builder](/create-a-custom-metric)— no need to write separate queries for each metric.

This update also removes per-query row limits. Instead, your data usage is governed by Databox's global dataset size limits, giving you more flexibility when working with larger datasets.

Starting in August 2025, theSnowflake integration **no longer supports standard basic authentication** (username and password). All connections must now use **programmatic access tokens (PATs)**, which are entered in place of the password during setup.

As a result, **existing connections using basic auth will stop working**. To restore connectivity and access new features like datasets, you'll need to update your Snowflake connection using a PAT.

 

Ask Genie
Get instant answers or help with your data using the in-app AI assistant.

Talk to an expert
For customers: Get help with your setup, strategy, or making the most of Databox.

Book a demo
New to Databox? See how it works and get guidance on getting started.

Send an email
Reach out to support for help with your account, data, or technical issues.