> For the complete documentation index, see [llms.txt](https://upsolver.gitbook.io/content/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://upsolver.gitbook.io/content/how-to-guides-1/connectors/create-connections/snowflake.md).

# Snowflake

Before you can write your transformed data to a table in Snowflake, you should first establish a connection to your Snowflake database.

## Create a Snowflake connection

#### Simple example

A Snowflake connection can be created as simply as follows:

```sql
CREATE SNOWFLAKE CONNECTION my_snowflake_connection
    CONNECTION_STRING = 
         'jdbc:snowflake://snowflakedemo.us-east-1.snowflakecomputing.com?
         db=DEMO_DB&warehouse=DEMO_WH&role=ADMIN'
    USER_NAME = 'your_user'
    PASSWORD = 'your_pass';
```

Note that a Snowflake connection must specify the database it is connecting to within the connection string. This means that in order to connect to multiple databases within your account, you need to create at least one connection per database.

#### Full example

The following example also creates a Snowflake connection but additionally limits the maximum number of concurrent connections to your database by configuring an additional option `MAX_CONCURRENT_CONNECTIONS`:

```sql
CREATE SNOWFLAKE CONNECTION my_snowflake_connection
    CONNECTION_STRING = 
        'jdbc:snowflake://snowflakedemo.us-east-1.snowflakecomputing.com?
        db=DEMO_DB&warehouse=DEMO_WH&role=ADMIN'
    USER_NAME = 'your_user'
    PASSWORD = 'your_pass'
    MAX_CONCURRENT_CONNECTIONS = 23
    COMMENT = 'Snowflake connection example';
```

## Alter a Snowflake connection

Certain connection options are considered mutable, meaning that in some cases, you can run a SQL command to alter an existing Snowflake connection rather than creating a new one.

For example, take the Snowflake connection we created previously:

```sql
CREATE SNOWFLAKE CONNECTION my_snowflake_connection
    CONNECTION_STRING = 
        'jdbc:snowflake://snowflakedemo.us-east-1.snowflakecomputing.com?
        db=DEMO_DB&warehouse=DEMO_WH&role=ADMIN'
    USER_NAME = 'your_user'
    PASSWORD = 'your_pass';
```

To change the database you are connecting to but keep everything else the same without having to create an entirely new connection, you can run the following command:

```sql
ALTER SNOWFLAKE CONNECTION my_snowflake_connection
    SET CONNECTION_STRING = 
        'jdbc:snowflake://snowflakedemo.us-east-1.snowflakecomputing.com?
        db=NEW_DB&warehouse=DEMO_WH&role=ADMIN'; 
```

## Drop a Snowflake connection

If you no longer need a certain connection, you can easily drop it with the following SQL command:

```sql
DROP CONNECTION my_snowflake_connection; 
```

However, note that if there are existing tables or jobs that are dependent upon the connection in question, the connection cannot be deleted.

***

{% hint style="success" %}
**Learn More**

To discover which connection options are mutable, and to learn more about the options, please see the SQL command reference for [Snowflake](/content/reference-1/sql-commands/connections/create-connection/snowflake.md).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://upsolver.gitbook.io/content/how-to-guides-1/connectors/create-connections/snowflake.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
