# Setting up a Snowflake Connector

## Overview

The Snowflake connector allows you to connect your Snowflake cloud database to Toucan.

In this guide, you'll learn how to connect Toucan Toco to your Snowflake data.

{% hint style="info" %}
If you’re looking for more advanced guides on how to configure rights and access in Snowflake for Toucan, you can check our other docs:

* [How to grant access to Toucan in Snowflake](https://docs.toucantoco.com/concepteur/tutorials/connectors/snowflake-connector-tuto/01-granting-access-in-snowflake.html)
{% endhint %}

## Configuring the Snowflake connector in Toucan

In this part, we assume you already have:

* a user (and its password). We'll use `TOUCAN_USER`
* that user has a role configured. We'll use `TOUCAN_ROLE`
* that role can access the database you need. We'll call it `TOUCAN_TEST`
* that role can use a warehouse. We'll call it `TOUCAN_WH`

Go to this [detailed guide on setting up Snowflake](https://docs.toucantoco.com/concepteur/tutorials/connectors/snowflake-connector-tuto/01-granting-access-in-snowflake.html) if you're missing something.

{% hint style="info" %}
As a security best practice, we recommend you create a specific user and role to connect to Toucan; check out our guide on granting access if you need to do this.
{% endhint %}

#### Configuring the Snowflake with login/password connector

* Click "Add connector" in the Toucan connector interface.
* Fill out the form with the following info:

<figure><img src="https://1809014303-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZxYYf1KpgarKMgMsDCrw%2Fuploads%2FgeD72171fZReCDTozoch%2Fimage.png?alt=media&#x26;token=e599b35a-a8c7-4dfb-8ca6-6ece1ee0d14b" alt="Snowflake Connector Form" width="365"><figcaption><p>Snowflake Connector Form</p></figcaption></figure>

* name: give a name, for example, "my\_snowflake\_connector"
* account: usually of the form `account_id.region_id.cloud_platform`. When you connect to your snowflake UI, it is the first part of the url `<account_identifier>.snowflakecomputing.com`. [You can read more about it here](https://docs.snowflake.com/en/user-guide/admin-account-identifier.html#account-identifiers)
* `authentication method`: leave it as "Snowflake (ID+Password)"
* User: `TOUCAN_USER`
* Password: The password for `TOUCAN_USER`
* Token endpoint: leave empty
* Token endpoint content type: leave unchanged ('application/json')
* Role: `TOUCAN_ROLE`
* Default Warehouse: `TOUCAN_WH`
* Retry policy: leave unchecked
* Click save. You should see the following check succeeding:

<figure><img src="https://1809014303-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZxYYf1KpgarKMgMsDCrw%2Fuploads%2FlWKXZwtDzTiryKr9dun0%2Fimage.png?alt=media&#x26;token=bc89e7d2-c764-49f0-9f1c-444980e01882" alt="Snowflake Connection Test" width="254"><figcaption><p>Snowflake connection test</p></figcaption></figure>

* Once the check has succeeded, you can close the popup window and save the form.

{% hint style="success" %}
After successfully configuring the connector, you will be able to find it in the Connector section of the DataHub "Datasource" tab
{% endhint %}

## Selecting data from Snowflake

To create a dataset from Snowflake, click on the "create from" icon, you will then be able to:

* Select the Database
* Select the Data warehouse
* Select the Schema
* Select Table or Views
* Only keep the columns you need

{% hint style="info" %}
For more info, see the dedicated section [creating-datasets](../../../../datasets-in-toucan/managing-datasets/creating-datasets "mention")&#x20;
{% endhint %}

{% hint style="success" %}
After selecting data from your connector you will be able to create a dataset thanks to [YouPrep](../../../../preparing-data/overview-of-youprep-tm) using the selection as "source step".
{% endhint %}
