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

# Snowflake

> Learn how to integrate AI agents with Snowflake using xpander.ai. Create intelligent agents that can query your Snowflake data warehouse, retrieve analytics insights, explore databases and schemas, and automate data-driven workflows.

## About Snowflake

**Snowflake** is a cloud-based data platform designed for modern analytics, AI applications, and large-scale data engineering. It enables developers, data teams, and intelligent agents to store, process, and analyze massive datasets using a unified, fully cloud-native data warehouse architecture.

Snowflake offers advanced capabilities such as data sharing, secure collaboration, and workload isolation through virtual warehouses, along with native support for modern data engineering and machine learning pipelines. These features allow teams to run concurrent analytical queries, ingest streaming or batch data, and securely share datasets across organizations, all while maintaining high performance and scalability.

## Authentication Options

Below are possible authentication options you can choose:

<Tabs>
  <Tab title="API Access">
    ### Generate a Snowflake Programmatic Access Token

    1. Log in to your [Snowflake account](https://app.snowflake.com/).

    2. Select **Governance & security**, then click **Users & roles**.

           <img src="https://mintcdn.com/xpanderai-099931d1/LDovJ5N4CCAVdJN6/images/connectors/snowflake/img_1.png?fit=max&auto=format&n=LDovJ5N4CCAVdJN6&q=85&s=1915038084c3e83b987b7e9464c33615" alt="Img 1" width="2880" height="1552" data-path="images/connectors/snowflake/img_1.png" />

    3. Select a user to open the user’s page, scroll down to the **Programmatic access tokens** section, and click **Generate token** to open the **New programmatic access token** dialog.

           <img src="https://mintcdn.com/xpanderai-099931d1/LDovJ5N4CCAVdJN6/images/connectors/snowflake/img_2.png?fit=max&auto=format&n=LDovJ5N4CCAVdJN6&q=85&s=cf9d29c7ca93274086f508f574e049cb" alt="Img 2" width="2104" height="1286" data-path="images/connectors/snowflake/img_2.png" />

    4. Enter a name for the new programmatic access token, set the expiry period and role, then click **Generate** to create the token.

    5. A new dialog will appear with the created token. Click **Copy to clipboard and close** to copy the generated token and store it somewhere safe.

           <img src="https://mintcdn.com/xpanderai-099931d1/LDovJ5N4CCAVdJN6/images/connectors/snowflake/img_3.png?fit=max&auto=format&n=LDovJ5N4CCAVdJN6&q=85&s=eacffabb027c4060f3dbe3911f195510" alt="Img 3" width="1964" height="1214" data-path="images/connectors/snowflake/img_3.png" />

    If your Snowflake user does not have a network policy, you’ll need to create one to proceed. Follow [Snowflake’s official instructions](https://docs.snowflake.com/en/guides/network-policies) to create a new network policy.

    Alternatively, you can grant temporary access for your programmatic access token. To do that:

    1. Click the ellipsis icon next to the programmatic access token

    2. Select **Bypass requirement for network policy** in the dropdown that appears to open the **Bypass Network Policy Requirement** dialog.

           <img src="https://mintcdn.com/xpanderai-099931d1/LDovJ5N4CCAVdJN6/images/connectors/snowflake/img_4.png?fit=max&auto=format&n=LDovJ5N4CCAVdJN6&q=85&s=84ad23c99d6618cfbcc3c891465252c2" alt="Img 4" width="2350" height="744" data-path="images/connectors/snowflake/img_4.png" />

    3. Specify a **Bypass window** and click **Grant access** to grant your programmatic access token temporary access.

           <img src="https://mintcdn.com/xpanderai-099931d1/LDovJ5N4CCAVdJN6/images/connectors/snowflake/img_5.png?fit=max&auto=format&n=LDovJ5N4CCAVdJN6&q=85&s=b80779bc8dd8ab7f784244d09ef81b5c" alt="Img 5" width="1208" height="914" data-path="images/connectors/snowflake/img_5.png" />

    ### Integrate Snowflake into xpander.ai

    1. Go to the **Agentic Connectors** section in the sidebar of your xpander.ai dashboard.
    2. Select **Snowflake** from the available integrations.
    3. Click **+ Create new connection**.
    4. Enter a **connector name** as desired, e.g., "xpander-snowflake".
    5. Paste your Snowflake programmatic access token into the provided **API Key** field.
    6. Copy the **base URL** from your Snowflake web console, e.g., `https://<account_identifier>.snowflakecomputing.com`, and paste it into the **Interface specific settings** field.
    7. Save the configuration.

           <img src="https://mintcdn.com/xpanderai-099931d1/LDovJ5N4CCAVdJN6/images/connectors/snowflake/img_6.png?fit=max&auto=format&n=LDovJ5N4CCAVdJN6&q=85&s=037f998d06597efdbb0d5eb6b0d12ebc" alt="Img 6" width="1930" height="1532" data-path="images/connectors/snowflake/img_6.png" />
  </Tab>
</Tabs>

## Integration of Snowflake into an AI Agent

Once you’ve configured your Snowflake connector with the authentication option(s) described above, you can integrate it into your AI agent with xpander.ai:

1. In your xpander.ai dashboard, navigate to the **Agents** page, select an agent and click **Edit** on the agent page to open the **Agent Configuration** tab.
2. Select **Tools**, then click **Add Tools**.
3. Select **Connectors**.
4. Choose **Snowflake** with the same **connector name** you configured in the previous section (e.g., xpander-snowflake).
5. Select the available Snowflake operations that suit your use case.

   To grant your agent database management capabilities, enable the following operations.

   * **Submit SQL Statements For Execution**
   * **Get Statement Status by Handle**
   * **Cancel Statement by Handle**

<img src="https://mintcdn.com/xpanderai-099931d1/LDovJ5N4CCAVdJN6/images/connectors/snowflake/img_7.png?fit=max&auto=format&n=LDovJ5N4CCAVdJN6&q=85&s=86875a8f186582c6f06e186c43a61418" alt="Img 7" width="2880" height="1556" data-path="images/connectors/snowflake/img_7.png" />

## AI Agent Snowflake Prompt Library

Below are possible prompts or use cases you can try after integrating Snowflake into your xpander.ai AI agent:

```
List my databases.
```

```
Add a <schema_name> to my <database_name> database.
```

```
Add a <table_name> with the following columns <table_columns> to the <schema_name> schema belonging to the <database_name> database.
```

```
Return all rows in the <table_name> table in the <schema_name> schema belonging to the <database_name> database.
```

<img src="https://mintcdn.com/xpanderai-099931d1/LDovJ5N4CCAVdJN6/images/connectors/snowflake/gif_1.gif?s=9fb4ff0da78f2ad725d1d12a4125fc9a" alt="Gif 1" width="800" height="411" data-path="images/connectors/snowflake/gif_1.gif" />

## Related Resources

* [Using Tools & Connectors in the xpander.ai platform](/guides/agents/tools-connectors)
* [Snowflake Documentation](https://docs.snowflake.com/en/index)
