---
title: Snowflake Integration
description: Automating data classification and privacy requests fulfillment by integrating MineOS with Snowflake
---

[Skip to content](https://docs.mineos.ai/knowledge/snowflake-integration#main-content)

[![Mine](https://docs.mineos.ai/hs-fs/hubfs/Frame%201948756858.png?width=62&height=40&name=Frame%201948756858.png)](https://docs.mineos.ai/knowledge)

Open main navigation

Close main navigation

 Hello! How can we help you?

- There are no suggestions because the search field is empty.

1. [Help center](https://docs.mineos.ai/knowledge)
2. [Integrations](https://docs.mineos.ai/knowledge/integrations)

# Snowflake Integration

## Automating data classification and privacy requests fulfillment by integrating MineOS with Snowflake

#### **Before you start**

- Make sure your MineOS plan supports integrations.
- Make sure you have sufficient permissions on Snowflake to a new role.

### **Setup in your Snowflake account**

Its best practice is to create a dedicated user and role for the MineOS integration. To do so, follow these steps:

1. From your Snowflake account admin, go to **Worksheets**
2. Open a new worksheet and run each of the following commands (Separately with the saymine user and password as you chose).

```
use role accountadmin;CREATE ROLE MINEOS;CREATE USER <mineosUser>    PASSWORD = '<mineosPassword>'    LOGIN_NAME = <mineosUser>GRANT ROLE MINEOS TO USER <mineosUser>;grant usage on database <my_db> to role MINEOS;grant usage on schema <my_db>.<my_schema> to role MINEOS;grant monitor on warehouse <warehouse_name> to role MINEOS;grant usage on warehouse <warehouse_name> to role MINEOS;grant select on all tables in schema <my_db>.<my_schema> to role MINEOS;grant delete on all tables in schema <my_db>.<my_schema> to role MINEOS;
```

Or do the following steps instead:

1. 1. Create a new role named “**MINEOS**” (Note: You can use any name for this role).
     2. Create a new user for the integration, and grant the role MINEOS
     3. Grant ‘usage’ for the required **database** to the role MINEOS
     4. Grant ‘usage’ for the required **schema** to the role MINEOS
     5. Grant 'monitor' for the required **warehouse** to role MINEOS;
     6. Grant 'usage' for the required **warehouse** to role MINEOS;

1. 1. Grant ‘select’ and ‘delete’ on the required **tables** to the role MINEOS

### Setting up in MineOS

Log in to your MineOS account, and follow these steps to setup the integration:

1. On the left sidebar, click **Inventory.**
2. Search for Snowflake. If you don't already have it, Click on **Add data source** and search for **Snowflake** from the catalog. Click **Add**.
3. Open the **Snowflake**page from your inventory.
4. Click the **DSR & Integrations **tab, scroll down and select **Integration** to reveal the integration setup section:

**User and Account Details**

1. Under **User Details**: Insert your new Snowflake username, password and role in the following format: 
   
   ```
   username;password;role
   ```
   
    
2. Under **Account Details**: Insert your Account Identifier, Region, and Warehouse in the following format:
   
   ```
   accountIdentifier;region;warehouse
   ```
   
   For more information on how to find your account identifier, [please read here](https://docs.snowflake.com/en/user-guide/admin-account-identifier#format-1-preferred-account-name-in-your-organization).
3. The last section contains 3 queries you can provide: search, copy & delete. Refer to the section below explaining about the function of each of the queries. The queries are mandatory!
4. To finalize the configuration click **Test & Save.** MineOS will check your Snowflake configuration and validate its working.
5. If you want to add more connections, simply click the **+ Add Instance** button at the top of the page.

![](https://docs.mineos.ai/hubfs/image-png-Jan-22-2023-12-12-51-2397-PM.png)

### Setting up for DSR workflow

To manage your **DSR handling actions**, you need to define the queries that will run in Snowflake for operation types you want to support. When creating privacy rights in DSR Setup, each right has an operation type associated with it (Delete/Copy) -  you will need to provide a query for the operation types you want to support, one or both.

**For example:**

Rights such as deletion or opt out are considered Delete operation type.

Rights such as Copy are considered Copy operation type.

**Note:** The queries you use won't be validated. You should run them in your Snowflake account to make sure they are running as expected

**Query used for search records & delete validation**

The query will be used for showing how many records were found as well as showing a sample (preview) of the data. Also, it will be used as a validation for the delete action.

Example Query:

```
SELECT name, age, country FROM db.schema.table WHERE NAME =  {{endUserEmail}} 
```

\* Preview will return the count of the number of records returned in the query response

\* Preview will show the first 3 values from the query response, it supports strings and long types

\* The variable is mandatory

 

**Copy Query**

The Copy query will be used for the **Copy** action. Copy action is running on the ticket processing page in ticket of type **Copy** when clicking on **Generate Copy**

Example Query:

```
SELECT * FROM db.schema.table WHERE NAME =  {{endUserEmail}} 
```

\* Copy will show all records returned in the query response

\* The variable is mandatory

 

**Delete Query**

The Delete query will be used for rights such as **Delete my data** or **Opt Out**. Delete action is running on the ticket processing page in ticket of type **Deletion** when clicking on **Run X Sources**

Example Query:

```
DELETE FROM db.schema.table WHERE NAME =  {{endUserEmail}} 
```

\* You can also use UPDATE statements to perform data modifications.

\* The variable is mandatory

### Setting up Data Classification

If you want to setup Snowflake data classification, simply enable **Scan this source using Data Classifier.** You also  need to make sure you have given the snowflake user the required permissions to the relevant tables and schemas .

Upon content discovery we will scan your tables, and analyze each row's data in our PII Processing Engine. These scan results will be added to the data types of your integration general info.

### **Troubleshooting**

 

**Error: "Must provide a Preview Query"**

You must provide a preview query in order for the Snowflake integration to work. You can use \`select 1\` as a placeholder query.

 

**Error: "Response status code does not indicate success: 403 (Forbidden)."**

This usually means there is an authentication issue with the connection details. The problem can happen for a number of reasons:

1. The username/password is wrong.
2. Or, the required SAYMINE role was not created properly (described above).
3. Or, the account ID or warehouse are wrong.

 

**Error: "The SSL connection could not be established, see inner exception."**

When this happens you should use a dashed (-) version of the account ID & region instead of an underscore (\_) version. For example instead of \`my\_account\_id;my\_region;my\_warehouse\` use: \`my-account-id;my-region;my\_warehouse\` (replacing \_ with - in the accountId and region)

 

#### **What's next?**

Read more about the deletion process using integrations [here](https://help.portal.saymine.com/knowledge/managing-deletion-requests-using-integrations).

Read more about the get a copy process using integrations [here](https://help.portal.saymine.com/knowledge/managing-copy-requests-using-integrations).

Talk to us if you need any help with Integrations via our chat or at [portal@saymine.com](mailto:portal@saymine.com), and we'll be happy to assist!🙂

- [Data Inventory](https://docs.mineos.ai/knowledge/data-inventory#main-content)
  
  
  
  
  
    - [Systems](https://docs.mineos.ai/knowledge/data-inventory#systems)
    - [Data types](https://docs.mineos.ai/knowledge/data-inventory#data-types)
    - [Activities](https://docs.mineos.ai/knowledge/data-inventory#activities)
- [Compliance Operations](https://docs.mineos.ai/knowledge/compliance-operations#main-content)
  
  
  
  
  
    - [Compliance reports](https://docs.mineos.ai/knowledge/compliance-operations#compliance-reports)
    - [Policies & alerts](https://docs.mineos.ai/knowledge/compliance-operations#policies-alerts)
    - [Risk assessments](https://docs.mineos.ai/knowledge/compliance-operations#risk-assessments)
- [DSR Handling](https://docs.mineos.ai/knowledge/dsr-handling#main-content)
  
  
  
  
  
    - [Setting Up Channels](https://docs.mineos.ai/knowledge/dsr-handling#setting-up-channels)
    - [Configuring Responses](https://docs.mineos.ai/knowledge/dsr-handling#configuring-responses)
    - [Processing Requests](https://docs.mineos.ai/knowledge/dsr-handling#processing-requests)
    - [Audit & Reporting](https://docs.mineos.ai/knowledge/dsr-handling#audit-reporting)
    - [Setting Up Rights & Workflows](https://docs.mineos.ai/knowledge/dsr-handling#setting-up-rights-workflows)
- [Integrations](https://docs.mineos.ai/knowledge/integrations#main-content)
  
  
  
  
  
    - [General information](https://docs.mineos.ai/knowledge/integrations#general-information)
- [Settings & Security](https://docs.mineos.ai/knowledge/settings-security#main-content)
  
  
  
  
  
    - [Security](https://docs.mineos.ai/knowledge/settings-security#security)
    - [Your Account](https://docs.mineos.ai/knowledge/settings-security#your-account)
- [Developers Documentation](https://docs.mineos.ai/knowledge/developers-documentation#main-content)
  
  
  
  
  
    - [Portal for developers](https://docs.mineos.ai/knowledge/developers-documentation#portal-for-developers)
    - [Webhook](https://docs.mineos.ai/knowledge/developers-documentation#webhook)
    - [Other](https://docs.mineos.ai/knowledge/developers-documentation#other)
- [Release Notes](https://docs.mineos.ai/knowledge/release-notes)
- [Consent Management](https://docs.mineos.ai/knowledge/consent-management)

[![Frame 1948756858](https://docs.mineos.ai/hs-fs/hubfs/Frame%201948756858.png?width=62&height=40&name=Frame%201948756858.png "Frame 1948756858")](https://mineos.ai/)

Copyright © 2026, "MineOS" (Saymine Technologies Inc)