# Snowflake Warehouse Setup

{% hint style="info" %}
Warehouses are only available for users on the Freshpaint business plan.
{% endhint %}

**To get started, you'll first need to run the following script on your Snowflake instance with the "WAREHOUSE", "PASSWORD", and "DATABASE" values filled in:**

```
-- change role to ACCOUNTADMIN for user / role steps
use role ACCOUNTADMIN;

-- create role for fivetran
create role if not exists fivetran_role;
grant role fivetran_role to role SYSADMIN;

-- create a user for fivetran
create user if not exists fivetran_freshpaint_user;
alter user fivetran_freshpaint_user set
default_role = fivetran_role
default_warehouse = <WAREHOUSE>
password = '<PASSWORD>';
grant role fivetran_role to user fivetran_freshpaint_user;

-- change role to SYSADMIN for warehouse / database steps
use role SYSADMIN;

-- create a warehouse for fivetran
create warehouse if not exists <WAREHOUSE>
warehouse_size = xsmall
warehouse_type = standard
auto_suspend = 60
auto_resume = true
initially_suspended = true;

-- change role to ACCOUNTADMIN for user / role steps
use role ACCOUNTADMIN;

-- grant fivetran access to warehouse
grant all privileges
on warehouse <WAREHOUSE>
to role fivetran_role;

-- create database for fivetran
create database if not exists <DATABASE>;

-- grant fivetran access to database
grant all privileges
on database <DATABASE>
to role fivetran_role;
```

\
Once this is completed, we'll need to finish the setup on our end. \
\
Please reach out to <support@freshpaint.io> and provide the following credentials:

* The host of your Snowflake instance.
* The name of the DB.
* The password.
  * This can be sent securely through [onetimesecret.com](http://onetimesecret.com/)

**Additionally, please make sure your DB is publicly addressable and then whitelist the following IPs:**

* 44.229.168.72/32
* 35.227.135.0/29
* 35.234.176.144/29
* 52.0.2.4/32

**Once this is completed, we'll need to finish the setup on our end. Notify <support@freshpaint.io> and we'll take it from here.**

{% hint style="info" %}
**We can also connect through an SSH proxy upon request.**
{% endhint %}


---

# 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.freshpaint.io/integrations/destinations/warehouses/snowflake.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.
