> 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/quickstarts-1/data-ingestion-wizard/using-the-wizard/target-set-up/snowflake.md).

# Snowflake

## Step 1 - Connect to Snowflake

### Create a new connection

Click **Create a new connection**, if it is not already selected.&#x20;

In the **Connection String** field, enter your connection in the following format:

{% code overflow="wrap" %}

```atom
jdbc:snowflake://<ACCOUNT_WITH_REGION>.snowflakecomputing.com?db=<DB_NAME>&warehouse=<WAREHOUSE_NAME>&role=<ROLE_NAME>
```

{% endcode %}

where:

* `ACCOUNT_WITH_REGION.snowflakecomputing.com`:  The connection URL in Snowflake, for example, `snowflakedemo.us-east-2.aws.snowflakecomputing.com`
* `DB_NAME`: The name of the target database.&#x20;
* `WAREHOUSE_NAME`: (Optional) The name of the target warehouse, otherwise the default is used. If no default warehouse exists, the connection will fail.
* `ROLE_NAME`: (Optional) The name of the role to use, otherwise the default role is used. If no default role exists, the connection will fail. To ensure proper functionality and access for our user when connecting to Snowflake, the following permissions need to be granted in snowflake:&#x20;
  * Grant usage on the specified database:

    <pre class="language-sql"><code class="lang-sql"><strong>GRANT USAGE ON DATABASE &#x3C;database_name> TO ROLE &#x3C;Role_name>;
    </strong></code></pre>
  * Grant usage on the specified schema within the database:

    ```sql
    GRANT USAGE ON SCHEMA <schema_name> TO ROLE <Role_name>;
    ```
  * Grant permissions to create tables and stages within the specified schema:

    ```sql
     CREATE TABLE, CREATE STAGE ON SCHEMA <schema_name> TO ROLE <Role_name>;
    ```
  * Grant permission to create schemas within the specified database:

    ```sql
    CREATE SCHEMA ON DATABASE <database_name> TO ROLE <Role_name>;
    ```

[Read more about connection string arguments in Snowflake.](https://docs.snowflake.com/en/user-guide/jdbc-configure.html#jdbc-driver-connection-string)

Provide the **Username** and **Password** that will be used to authenticate to the database.

In the **Name your connection** field, type in the name for this connection. Please note this connection will be available to other users in your organization.&#x20;

<figure><img src="/files/Md5SvqcaP1vNZvel83WV" alt=""><figcaption><p>Create a new connection to Snowflake to use as the target for your ingestion job.</p></figcaption></figure>

### Use an existing connection

By default, if you have already created a connection, Upsolver selects **Use an existing connection**, and your Snowflake connection is populated in the list.&#x20;

For organizations with multiple connections, select the target connection you want to use.

<figure><img src="/files/XEc6O9LgkbEddbtPmXdD" alt=""><figcaption><p>Select your Snowflake connection to use as the target for your ingestion job.</p></figcaption></figure>

## Step 2 - Select where to ingest the data

Select an existing schema for the ingested data in the **Select a target schema** list.

If you are ingesting into a single table, provide a name for the new table. If the source is a database (MySQL or PostgreSQL) Upsolver will create new tables in the selected schema.&#x20;

When ingesting multiple source schemas into Snowflake you have the following options:

1. Ingest all tables into a single Snowflake schema and add the source schema name to every new table created in Snowflake.
2. Map every source schema into a target schema in Snowflake.


---

# 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/quickstarts-1/data-ingestion-wizard/using-the-wizard/target-set-up/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.
