# Snowflake

<figure><img src="/files/rDkkw5ZmBirWWp5Pa6GO" alt=""><figcaption></figcaption></figure>

With Codatum, you can connect, query, and manage data of Snowflake.

## How to Set Up

### 1. Prepare a Key-Pair and Snowflake User

Currently, only key-pair authentication is supported. Refer to the [Snowflake user-guide key-pair-auth](https://docs.snowflake.com/en/user-guide/key-pair-auth) for instructions on creating a key pair and associating the public key with the Snowflake user you plan to use for the connection.

### 2. Grant the Necessary Privileges

You must grant privileges to the role assigned to the Snowflake user:

* Prepare a Role
  * Create a new role or use an existing one, then assign it to the user you created.
* Warehouse Privileges
  * Grant the `USAGE` privilege on the warehouse you want to use to that role.
* Database Privileges
  * Grant the `USAGE` privilege on the database you want to use to that role.
* Schema Privileges
  * Grant the `USAGE` privilege on the schema you want to use to that role.
* Table Privileges
  * Grant the `SELECT` privilege on the table you want to use to that role.

### 3. Register the Snowflake Connection in Codatum

Finally, create Snowflake Connection in Codatum

1. In the `Workspace Settings` -> `Connections`, select `Add Connection`
2. Enter a `Connection Name`
3. Select the `Access Level`
4. Enter the `Organization name`
   * The name of your Snowflake organization. See [Snowflake user-guide admin-account-identifier](https://docs.snowflake.com/en/user-guide/admin-account-identifier#label-account-name-find) for more details.
5. Enter the `Account name`
   * The name of your Snowflake account. (Be careful not to confuse this with the full account identifier, which includes the organization name.) See [Snowflake user-guide admin-account-identifier](https://docs.snowflake.com/en/user-guide/admin-account-identifier#label-account-name-find) for more details.
6. Enter the `User name`
   * Use the User name you prepared in the step1.
7. Enter the `Role`
   * Use the Role name you prepared in the step2.
8. Enter the `Warehouse name`
   * Use the Warehouse name you prepared in the step2.
9. Enter the `Database name`
   * Specifies the default database in which statements are executed (like “namespace”). This setting does not limit which tables or schemas you can query.
10. Enter the `Private key`
    * Use the Private key you prepared in the step1.
    * Paste the entire private key, including the lines `\-----BEGIN PRIVATE KEY-----` and `-----END PRIVATE KEY-----`
11. Add datasets to the Sync target

## Network and Firewall Restrictions

Currently, Codatum does not provide a fixed IP address for connections. If you need to whitelist IP addresses in Snowflake for security reasons, please contact Codatum Support to discuss possible options.


---

# Agent Instructions: 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:

```
GET https://docs.codatum.com/connect-and-manage-data/supported-warehouses/snowflake.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
