# Edit or Remove Your Snowflake Integration

To [edit](#edit-a-snowflake-integration) or [remove](#remove-a-snowflake-integration) a Snowflake integration, you have two options:

* **Automatic**: Grant Immuta one-time use of credentials with the following privileges to automatically edit or remove the integration:
  * `CREATE DATABASE ON ACCOUNT WITH GRANT OPTION`
  * `CREATE ROLE ON ACCOUNT WITH GRANT OPTION`
  * `CREATE USER ON ACCOUNT WITH GRANT OPTION`
  * `MANAGE GRANTS ON ACCOUNT WITH GRANT OPTION`
* **Manual**: Run the Immuta script in your Snowflake environment as a user with the following privileges to edit or remove the integration:
  * `CREATE DATABASE ON ACCOUNT WITH GRANT OPTION`
  * `CREATE ROLE ON ACCOUNT WITH GRANT OPTION`
  * `CREATE USER ON ACCOUNT WITH GRANT OPTION`
  * `MANAGE GRANTS ON ACCOUNT WITH GRANT OPTION`
  * `APPLY MASKING POLICY ON ACCOUNT WITH GRANT OPTION`
  * `APPLY ROW ACCESS POLICY ON ACCOUNT WITH GRANT OPTION`

## Edit a Snowflake integration

Select one of the following options for editing your integration:

* [**Automatic**](#automatic-edit): Grant Immuta one-time use of credentials to automatically edit the integration.
* [**Manual**](#manual-edit): Run the Immuta script in your Snowflake environment yourself to edit the integration.

### Automatic edit

1. Click the <i class="fa-gear">:gear:</i> **App Settings** icon in the navigation menu.
2. Click the **Integrations** tab and click the **down arrow** next to the Snowflake integration.
3. Edit the field you want to change or check a checkbox of a feature you would like to enable. *Note any field shadowed is not editable, and the integration must be disabled and re-installed to change it.*
4. From the **Select Authentication Method Dropdown**, select either **Username and Password** or **Key Pair Authentication**:
   * **Username and Password** option: Complete the **Username**, **Password**, and **Role** fields.
   * **Key Pair Authentication** option:
     1. Complete the **Username** field.
     2. When using a private key, enter the private key file password in the **Additional Connection String Options**. Use the following format: `PRIV_KEY_FILE_PWD=<your_pw>`
     3. Click **Key Pair (Required)**, and upload a Snowflake key pair file.
     4. Complete the **Role** field.
5. Click **Save**.

### Manual edit

1. Click the <i class="fa-gear">:gear:</i> **App Settings** icon in the navigation menu.
2. Click the **Integrations** tab and click the **down arrow** next to the Snowflake integration.
3. Edit the field you want to change or check a checkbox of a feature you would like to enable. *Note any field shadowed is not editable, and the integration must be disabled and re-installed to change it.*
4. Click **edit script** to download the script, and then run it in Snowflake.
5. Click **Save**.

## Remove a Snowflake integration

Select one of the following options for deleting your integration:

* [**Automatic**](#automatic-removal): Grant Immuta one-time use of credentials to automatically remove the integration and Immuta-managed resources from your Snowflake environment.
* [**Manual**](#manual-removal): Run the Immuta script in your Snowflake environment yourself to remove Immuta-managed resources and policies from Snowflake.

### Automatic removal

1. Click the <i class="fa-gear">:gear:</i> **App Settings** icon in the navigation menu.
2. Click the **Integrations** tab and click the **down arrow** next to the Snowflake integration.
3. Click the **checkbox** to disable the integration.
4. Enter the **Username**, **Password**, and **Role** that was entered when the integration was configured.
5. Click **Save**.

### Manual removal

{% hint style="warning" %}
**Cleaning up your Snowflake environment**\
Until you manually run the cleanup script in your Snowflake environment, Immuta-managed [roles](https://documentation.immuta.com/latest/configuration/integrations/reference-guides/table-grants-overview#table-grants-role) and Immuta policies will still exist in Snowflake.
{% endhint %}

1. Click the <i class="fa-gear">:gear:</i> **App Settings** icon in the navigation menu.
2. Click the **Integrations** tab and click the **down arrow** next to the Snowflake integration.
3. Click the **checkbox** to disable the integration.
4. Click **cleanup script** to download the script.
5. Click **Save**.
6. Run the cleanup script in Snowflake.
