> For the complete documentation index, see [llms.txt](https://docs.balkan.id/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.balkan.id/getting-started/setting-up-your-tenant/application-integrations/direct-application-integrations/snowflake-integration-setup.md).

# Snowflake Integration setup

### Getting Started

#### Requirements:

* RSA Public Key (at the bottom of this page)
* Account ID
* Integration User name
* Integration User role

#### Steps to obtain the necessary fields to configure snowflake

1. Login to your Snowflake account
2. Create a user by going to *Settings* > *Users & Roles* and click on **Create User**. You should be presented with the following:

   Fill in the details, and make a note of the User Name:

   ![](https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2Fd3bbWBdvui8EyqIGsutG%2Fimage.png?alt=media\&token=6cfe72a2-4e94-4de0-aba9-b78b3a1646a5)
3. Now go into `Worksheets`, create a new Worksheet, and execute the following SQL commands one by one.
   * First we will create a role for this user to grant it the necessary permissions:

     ```
     CREATE ROLE BALKANID_ROLE;
     GRANT MANAGE GRANTS ON ACCOUNT TO ROLE BALKANID_ROLE;
     ```
   * In order to avail credential discovery, you need to grant these permissions as well:

     ```
     GRANT USAGE ON WAREHOUSE COMPUTE_WH TO ROLE BALKANID_ROLE;
     GRANT IMPORTED PRIVILEGES ON DATABASE SNOWFLAKE TO ROLE BALKANID_ROLE;
     GRANT ROLE ACCOUNTADMIN TO ROLE BALKANID_ROLE;
     ```

     ***Note:** Replace `COMPUTE_WH` with the name of the warehouse that will be used by the integration user.*
   * Then we assign it to our user:

     ```
     GRANT ROLE BALKANID_ROLE TO USER BALKAN_ID;
     ```
4. Copy the BalkanID RSA public key found in the [Snowflake Public Key](#snowflake-public-key) section at the bottom of this page and run the following command on your Snowflake worksheet or shell: `ALTER USER BALKAN_ID SET RSA_PUBLIC_KEY='{PUBLIC_KEY}'`
5. Acquire your account identifier by following the instructions given here:

   [Account Identifiers | Snowflake Documentation](https://docs.snowflake.com/en/user-guide/admin-account-identifier#option-2-account-locator-in-a-region)

### Configure Snowflake in your BalkanID tenant

1. Login to the BalkanID application and switch to the tenant you would like to add your integration to.
2. Head to **Integrations** > **Add Integration**, select **Snowflake**.

   ![](https://content.gitbook.com/content/bVGYwk8aSk5yI1GDPEW9/blobs/3YsVn0WtbBMtGu47fuK1/image.png)
3. Set up the *Primary Application owner* and the *Description*, if any.\
   \
   Now, under Direct Configuration, fill the fields with the values that were noted prior.

   1. **Account ID** will be your account identifier
   2. **Username** will be the username of the user you created for the integration (BALKAN\_ID)
   3. **Role** will be the name of the role which has been granted the `MANAGE GRANTS` permission and has been granted to the integration user.
   4. **Warehouse** will be the name of the warehouse that the integration user is configured to use for running discovery queries (for example, `COMPUTE_WH`

   ![](https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2F7Fw750xz96Drl6g8LQqI%2Fimage.png?alt=media\&token=29d5b435-6d14-4ed5-bd24-9404b4e2cdab)
4. Once you filled in the information, click **Next** to install the application. Your integration is now configured and you will see the status of the integration displayed alongside other integrations on the *Integrations* page. Integrations are synced daily. When data is available, the integration Status column will read **Connected** and the integration Message will read **Data available**.

### Snowflake Public Key

{% file src="/files/rjIW3KF6WxUmR3xQYmLG" %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.balkan.id/getting-started/setting-up-your-tenant/application-integrations/direct-application-integrations/snowflake-integration-setup.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
