# Snowflake

## Overview

You can create a Snowflake Destination Connector to write to a table within your Snowflake, using Snowflake's key pair authentication. &#x20;

To set up this Destination Connector, you will need to configure key pair authentication for your Snowflake account and provide the private key. To learn more about configuring key pair authentication within Snowflake, visit: <https://docs.snowflake.com/en/user-guide/key-pair-auth.html>

The schema for this Destination Connector is defined by the Snowflake table schema.

## Prerequisites

Required information:

* Private Key
* Account Name
* User Name (with appropriate privileges)
* Warehouse

## Creating a Snowflake Destination Connector

**Step 1:** After selecting **+ New Connector**, under the **System** prompt, click **Snowflake.**

![](https://353417064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYrsDW6vGBTygB1qqSE%2Fuploads%2FAhwTA1ljbwxY5l7bd8Zx%2Fimage.png?alt=media\&token=0e7fd037-1128-4294-a323-9e468c60b165)

**Step 2:** Enter a **Connector Name.**&#x200C;

**Step 3:** Select **Destination Connector.**

### Authentication

**Step 4:** Provide a private key for your Snowflake environment in PEM format as shown below:

![](https://353417064-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MYrsDW6vGBTygB1qqSE%2F-Ma5OTW2GKRzIThPl5Oj%2F-Ma5RBUKFMQGBq4T8r_H%2Fimage.png?alt=media\&token=de3a9e34-fcfc-4344-9d50-2bcf72114669)

{% hint style="info" %}
**Note:** We do not currently support encrypted keys
{% endhint %}

To learn more about configuring key pair authentication for your Snowflake account, visit: <https://docs.snowflake.com/en/user-guide/key-pair-auth.html>

### **Account & Database Information**

**Step 5:** Provide your Snowflake account locator in this format `<account_locator>.<region_id>.<cloud>`

{% hint style="info" %}
**Note:** You can find the account\_locator, region\_id and cloud info in your account URL. Please see a screenshot below to find your account URL:
{% endhint %}

<figure><img src="https://353417064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYrsDW6vGBTygB1qqSE%2Fuploads%2FzS0XrozmDLgXKzS0kIvc%2FScreenshot%202024-06-19%20at%202.51.36%E2%80%AFPM.png?alt=media&#x26;token=93451094-9365-4501-9e85-fb1b0b42dcfb" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Note:** Your full account name may include segments that identify the region and cloud platform where your account is hosted. Include those additional segments when providing your account name.&#x20;

To learn more about Snowflake account names, visit: \
<https://docs.snowflake.com/en/user-guide/admin-account-identifier.html#non-vps-account-locator-formats-by-cloud-platform-and-region>
{% endhint %}

**Step 6:** Provide your **User Name**.

{% hint style="info" %}
This **User Name** must be associated with an account that has the required permissions enabled in order to successfully build a connector. \
\
To learn more about Snowflake access controlprivledges, visit:\
<https://docs.snowflake.com/en/user-guide/security-access-control.html>
{% endhint %}

**Step 7:** Provide the name of the W**arehouse** that will execute the query you provide below.

**Step 8:** Provide the name of the **Database** that contains the table you want to write to.

**Step 9:** Provide the name of the **Schema** that contains the table you want to write to.

**Step 10:** Provide the name of the **Table** you want to write to.

{% hint style="info" %}
**Note:** the schema for this Destination Connector is defined by the Snowflake table schema.
{% endhint %}

## Advanced Options

#### Validation Webhook

We support the use of Validation Webhooks to prevent bad data from being written to your systems, adding another layer of protection to the built-in validations that Osmos provides. The Webhook URL can be posted here.

{% hint style="info" %}
For more information on Validation Webhook configuration, see [Server Side Validation Webhooks](https://docs.osmos.io/developer-docs/validation-and-transformation-webhooks)
{% endhint %}

## Connector Options

The connector can be deleted, edited and duplicated.

Duplication

To save time, the connector can be duplicated.  This new connector needs to be named and can be edited, as needed.

<figure><img src="https://353417064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYrsDW6vGBTygB1qqSE%2Fuploads%2FQ6ASln3AAfANg318CnjO%2FCleanShot%202024-01-04%20at%2020.53.21%402x.png?alt=media&#x26;token=f2869afe-3e6b-4f66-979d-dcc0e7bada22" alt="" width="563"><figcaption></figcaption></figure>
