# Use Snowflake Data Sharing with Immuta

Immuta is compatible with [Snowflake Secure Data Sharing](https://docs.snowflake.com/en/user-guide/data-sharing-intro.html). Using both Immuta and Snowflake, organizations can share the policy-protected data of their Snowflake database with other Snowflake accounts with Immuta policies enforced in real time.

**Prerequisites**:

* [Snowflake integration enabled](/2024.3/integrations/snowflake/how-to-guides/enterprise.md)
* [Snowflake tables registered in Immuta as data sources](/2024.3/data-and-integrations/registering-metadata/register-data-sources/query-backed-tutorial.md)

## Create Immuta Policies to Protect the Data

**Required Permission**: Immuta: `GOVERNANCE`

[Build Immuta data policies](/2024.3/secure-your-data/authoring-policies-in-secure/data-policies.md) to fit your organization's compliance requirements.

It's important to understand that subscription policies are not relevant to Snowflake data shares, because the act of sharing the data *is* the subscription policy. Data policies can be enforced on the consuming account from the producer account on a share following these instructions.

## Register the Snowflake Data Consumer with Immuta

**Required Permission**: Immuta: `USER_ADMIN`

To register the Snowflake data consumer in Immuta,

1. [Create a new Immuta user](/2024.3/people/immuta-users/how-to-guides/managing-personas-and-permissions.md#create-users).
2. [Update the Immuta user's Snowflake username](/2024.3/people/immuta-users/how-to-guides/external-user-mapping.md#manually-configure-external-user-id-mapping-on-a-users-page) to match the account ID for the data consumer. This value is the output on the data consumer side when `SELECT CURRENT_ACCOUNT()` is run in Snowflake.
3. [Give the Immuta user the appropriate attributes and groups](/2024.3/people/immuta-users/how-to-guides/managing-attribute-and-group.md#add-group-or-user-attribute) for your organization's policies.
4. [Subscribe the Immuta user to the data sources](/2024.3/data-and-integrations/registering-metadata/data-source-settings/how-to-guides/manage-members.md).

## Create the Snowflake Data Share

**Required Permission**: Snowflake `ACCOUNTADMIN`

To share the policy-protected data source,

1. [Create a Snowflake Data Share](https://docs.snowflake.com/en/user-guide/data-sharing-gs.html#getting-started-with-secure-data-sharing) of the Snowflake table that has been registered in Immuta.
2. Grant reference usage on the Immuta database to the share you created:

   ```sql
   GRANT REFERENCE_USAGE ON DATABASE "<Immuta database of the provider account>" TO SHARE "<DATA_SHARE>";
   ```

   Replace the content in angle brackets above with the name of your Immuta database and Snowflake data share.


---

# 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://documentation.immuta.com/2024.3/integrations/snowflake/how-to-guides/integration-settings/use-data-sharing.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.
