# Integrate Snowflake as your data repository

## Choose Snowflake <a href="#choose-snowflake" id="choose-snowflake"></a>

After defining your company profile in the guided onboarding, select **Snowflake** as the data logging platform.

You must have admin privileges in Snowflake in order to complete the integration.

<figure><img src="https://4253518893-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyHwthHcpZXpcJV1cs4SA%2Fuploads%2FtFoOLzOhhYRzm8sXFt9k%2Fsnowflake%20data%20repo.png?alt=media&#x26;token=eade6554-1bb1-4309-9221-164b2450c74e" alt=""><figcaption></figcaption></figure>

## Connect Snowflake to the Anvilogic platform <a href="#connect-snowflake-to-the-anvilogic-platform" id="connect-snowflake-to-the-anvilogic-platform"></a>

Perform the following steps to complete the integration with Snowflake:

1. Input your Snowflake account identifier to establish a connection between your Snowflake instance and the Anvilogic platform.
2. Click **Copy Code**, then click **Go to Snowflake** to go to your Snowflake instance and run the copied SQL commands. This set of SQL commands creates the necessary Snowflake components, the anvilogic\_service Snowflake user used by the Anvilogic platform, and assigns the necessary permissions to the anvilogic\_admin role for the anvilogic\_service user.
3. Perform the following tasks in your Snowflake instance:
   1. Open a new worksheet.
   2. Change the role from PUBLIC to ACCOUNTADMIN.
   3. Paste the copied SQL commands into the new worksheet.
   4. Click the **All Queries** checkbox to run all the commands.
   5. Click **Run**.
   6. Look for the **Statement executed successfully** message.

      <figure><img src="https://4253518893-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyHwthHcpZXpcJV1cs4SA%2Fuploads%2F6JzCn88VHTCnLXdfIwBn%2Fsnowflake%20config%201.png?alt=media&#x26;token=6c71eaec-b4ce-4909-9a6f-c1223b0d6a6d" alt=""><figcaption></figcaption></figure>
4. Return to the Anvilogic platform, then click **Next**.
5. Click **Copy Code**, then click **Go to Snowflake** to go to your Snowflake instance and run the copied SQL commands. This set of SQL commands creates the S3 storage integration and allows access to the anvilogic\_service user so that a connection to your managed S3 bucket where Snowflake retrieves the data can be made.
6. Perform the following tasks in your Snowflake instance:
   1. Open a new worksheet.
   2. Change the role from PUBLIC to ACCOUNTADMIN.
   3. Paste the copied SQL commands into the new worksheet.
   4. Click the **All Queries** checkbox to run all the commands.
   5. Click **Run**.
   6. Look for the **Statement executed successfully** message.

      <figure><img src="https://4253518893-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyHwthHcpZXpcJV1cs4SA%2Fuploads%2FMusHnmxr234F0uGmJCW4%2Fsnowflake%20config%202.png?alt=media&#x26;token=91a80596-c7cc-4c8b-a230-adb5f4a83c5d" alt=""><figcaption></figcaption></figure>
7. Return to the Anvilogic platform, then click **Add**.

## Next step <a href="#next-step" id="next-step"></a>

After you have defined your company's threat profile and connected Snowflake as a data repository, it's time to [get-data-into-snowflake](https://public-docs.anvilogic.com/get-started/onboarding-guide/select-your-data-repository-and-get-data-in/integrate-snowflake-as-your-data-repository/get-data-into-snowflake "mention").
