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

# Snowflake

> Query and manage your Snowflake data warehouse with SQL operations across databases, schemas, and tables

## At a glance

* **Availability**: Experimental ([how to enable](/cloud/integrations)).
* **Auth**: API key.
* **Connection**: The key from `SNOWFLAKE_PAT` is sent as the `Bearer` prefixed `Authorization` header.
* **Docs**: [https://docs.snowflake.com/en/developer-guide/sql-api/authenticating](https://docs.snowflake.com/en/developer-guide/sql-api/authenticating)

## Credentials

Set these per environment. See [Connect an integration](/cloud/integrations).

| Variable              | Required | Description                                                                                                                                                    |
| --------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `SNOWFLAKE_PAT`       | Yes      | Snowflake programmatic access token (PAT) used as a Bearer token with the SQL API [Docs](https://docs.snowflake.com/en/user-guide/programmatic-access-tokens). |
| `SNOWFLAKE_ACCOUNT`   | Yes      | Your Snowflake account identifier (e.g., xy12345.us-east-1) [Docs](https://docs.snowflake.com/en/user-guide/admin-account-identifier).                         |
| `SNOWFLAKE_USERNAME`  | Yes      | Snowflake username for authentication [Docs](https://docs.snowflake.com/en/user-guide/admin-user-management).                                                  |
| `SNOWFLAKE_PASSWORD`  | Yes      | Snowflake password for authentication [Docs](https://docs.snowflake.com/en/user-guide/admin-user-management).                                                  |
| `SNOWFLAKE_WAREHOUSE` | Yes      | Default warehouse to use for queries (e.g., COMPUTE\_WH) [Docs](https://docs.snowflake.com/en/user-guide/warehouses).                                          |
| `SNOWFLAKE_DATABASE`  | No       | Default database to use for queries [Docs](https://docs.snowflake.com/en/user-guide/databases).                                                                |
| `SNOWFLAKE_SCHEMA`    | No       | Default schema to use for queries (defaults to PUBLIC) [Docs](https://docs.snowflake.com/en/user-guide/databases).                                             |

## Setup

1. **Locate Your Account Identifier**: Find your Snowflake account identifier in the Snowflake web interface URL (e.g., xy12345.us-east-1 from [https://xy12345.us-east-1.snowflakecomputing.com](https://xy12345.us-east-1.snowflakecomputing.com))
2. **Create or Use Existing User**: Use an existing Snowflake user or create a new one with appropriate permissions. The user needs USAGE privileges on the warehouse and database, and SELECT privileges on tables.
3. **Generate a Programmatic Access Token**: In Snowsight, open your user profile > Settings > Authentication and generate a programmatic access token (PAT), or run ALTER USER .... ADD PROGRAMMATIC ACCESS TOKEN. The SQL API does not accept username/password basic auth; the PAT is sent as a Bearer token.
4. **Configure Warehouse**: Ensure you have a warehouse created and running. The default warehouse is typically named COMPUTE\_WH.
5. **Set Environment Variables**: Add the following environment variables to your .env file with your Snowflake credentials
6. **Test Connection**: Test your connection by listing databases or running a simple query

## Tools

| Tool           | Access | Description                                               |
| -------------- | ------ | --------------------------------------------------------- |
| Run Query      | Write  | Execute a SQL query against your Snowflake data warehouse |
| List Databases | Read   | List all databases in your Snowflake account              |
| List Schemas   | Read   | List all schemas in a Snowflake database                  |
| List Tables    | Read   | List all tables in a Snowflake database schema            |
| Describe Table | Read   | Get detailed column information for a specific table      |

## Example prompts

* Help me query data from my Snowflake data warehouse. Show me specific records or analyze patterns.
* Show me the structure of tables in my Snowflake database and help me understand the schema.
* Analyze my Snowflake data and generate insights about trends, patterns, and anomalies.
* Help me optimize my SQL queries for better performance in Snowflake.
