> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tight.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Snowflake

> Push accounting data directly to your Snowflake data warehouse

## Overview

Tight integrates directly with Snowflake to periodically upload raw accounting data to your own Snowflake data warehouse. By pushing data into your Snowflake infrastructure, Tight eliminates the need for your data team to build direct connections to the Tight API, allowing your team to work in the data stack they're already using.

Data is exported in [Parquet file](https://parquet.apache.org/) format on daily, weekly, or monthly intervals, including bank linkage data, invoices, lifecycle events, and transactions. Learn more about available data types and use cases in the [Data Lakes guide](/guides/business-owners/data-lakes).

## Create a Snowflake Managed Stage

If you haven't done so already, create a [Snowflake account](https://www.snowflake.com/) and [create a Snowflake Managed Stage](https://docs.snowflake.com/en/developer-guide/snowflake-cli/stages/manage-stages) where Tight will upload your data. You can name this stage anything you'd like; "TIGHT\_DATALAKE\_UPLOADS" is used for the examples shown below.

<img src="https://mintcdn.com/tight-7c882d74/PBb8Gf8jW9PRt_Fg/integrations/analytics/snowflakeFiles/1.png?fit=max&auto=format&n=PBb8Gf8jW9PRt_Fg&q=85&s=81e67f3eccfab24cf03d0b5480b3ac73" alt="Snowflake Stages" width="842" height="670" data-path="integrations/analytics/snowflakeFiles/1.png" />

<img src="https://mintcdn.com/tight-7c882d74/PBb8Gf8jW9PRt_Fg/integrations/analytics/snowflakeFiles/2.png?fit=max&auto=format&n=PBb8Gf8jW9PRt_Fg&q=85&s=2512810103ff3cfa36a52f3d923742d9" alt="Create Snowflake Stage" width="569" height="782" data-path="integrations/analytics/snowflakeFiles/2.png" />

Make note of the database name and stage name, as you'll need to share these with Tight.

## Create Key Pair Authentication Keys

Next, [generate key pair authentication keys](https://docs.snowflake.com/en/user-guide/key-pair-auth) for secure authentication to your Snowflake account.

From the command prompt, execute the following commands:

```bash theme={null}
openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out rsa_key.p8 -nocrypt
```

```bash theme={null}
openssl rsa -in rsa_key.p8 -pubout -out rsa_key.pub
```

Save both `rsa_key.p8` and `rsa_key.pub` files securely for use in later steps.

<Tip>
  Store the private key (`rsa_key.p8`) securely. You'll need to share this with Tight to enable data uploads.
</Tip>

## Create an Upload Role

Create a dedicated role for Tight to use when uploading data to your Snowflake warehouse. For example, name it `TIGHT_UPLOADER_ROLE`:

<img src="https://mintcdn.com/tight-7c882d74/PBb8Gf8jW9PRt_Fg/integrations/analytics/snowflakeFiles/3.png?fit=max&auto=format&n=PBb8Gf8jW9PRt_Fg&q=85&s=324ba0b2b6761335c0efc4c4b20be0b0" alt="New Snowflake Role" width="897" height="614" data-path="integrations/analytics/snowflakeFiles/3.png" />

## Grant Role Permissions

Grant the necessary permissions to the `TIGHT_UPLOADER_ROLE`:

**Grant USAGE to Database:**

<img src="https://mintcdn.com/tight-7c882d74/PBb8Gf8jW9PRt_Fg/integrations/analytics/snowflakeFiles/4.png?fit=max&auto=format&n=PBb8Gf8jW9PRt_Fg&q=85&s=3cd20db818c1ec818f6db9df386c30ab" alt="Grant Data Lake Privileges" width="1027" height="470" data-path="integrations/analytics/snowflakeFiles/4.png" />

**Grant USAGE to the PUBLIC Schema:**

<img src="https://mintcdn.com/tight-7c882d74/PBb8Gf8jW9PRt_Fg/integrations/analytics/snowflakeFiles/5.png?fit=max&auto=format&n=PBb8Gf8jW9PRt_Fg&q=85&s=a269758ad0f3b6b1a7ca588ad7954028" alt="Grant Public Privileges" width="1116" height="453" data-path="integrations/analytics/snowflakeFiles/5.png" />

**Grant READ/WRITE to the Stage:**

Grant read and write permissions to the stage you created (e.g., `TIGHT_DATALAKE_UPLOADS`):

<img src="https://mintcdn.com/tight-7c882d74/PBb8Gf8jW9PRt_Fg/integrations/analytics/snowflakeFiles/6.png?fit=max&auto=format&n=PBb8Gf8jW9PRt_Fg&q=85&s=bc6ea08f8f67a6e36ae7264ff155ccca" alt="Grant Read/Write Access" width="1080" height="543" data-path="integrations/analytics/snowflakeFiles/6.png" />

## Create a Service User

Create a service user using Snowflake SQL. Service users with RSA authentication cannot be created through the Snowflake UI, so you'll need to execute SQL commands.

Using the public key from `rsa_key.pub` that you generated earlier, execute the following SQL statement:

```sql theme={null}
CREATE OR REPLACE USER TIGHT_UPLOADER_USER
TYPE = SERVICE
RSA_PUBLIC_KEY = '-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0chQEeQSKX3I+Y5VD3M+
kyPEbFDTgmEqxgerz3hIihUGV+iWWoHdeUYFCORfK1p/Sa3e3u79h1+hI4e9lsWU
8xLUCUlcfImbu7EbZ5oNYlhRi5nFhkqN4YlylbUghlsmJv7GK4L68i9M/WUoG9RR
yvHghltIMpwbQfRZ4wYG5Dc2sl7ZbCe8qn7VGrSzWWcex3WK9K8kbBJkK86H8X7u
L1QgY+a//s32HuBmbfV8+x4kC3oSrFhPDFJX5kJI33UPqRNyuhSZOuJMMNhXX8bh
PAKY4ExZVotEKX+p8hZ0La5N7TT+Ma08Zp9WR5YGuG2XPK+9dE2Yg9Luauc+R4hj
wwIDAQAB
-----END PUBLIC KEY-----'
DEFAULT_ROLE = 'TIGHT_UPLOADER_ROLE'
DEFAULT_WAREHOUSE = 'COMPUTE_WH'
COMMENT = 'Tight service account for uploading to stage';
```

<Tip>Replace the example RSA public key with your actual public key.</Tip>

<img src="https://mintcdn.com/tight-7c882d74/PBb8Gf8jW9PRt_Fg/integrations/analytics/snowflakeFiles/7.png?fit=max&auto=format&n=PBb8Gf8jW9PRt_Fg&q=85&s=112a246ab39e2514fc90eaaaf83bad95" alt="Tight Snowflake User" width="1025" height="410" data-path="integrations/analytics/snowflakeFiles/7.png" />

<Tip>
  Replace the example RSA public key with the contents of your `rsa_key.pub` file, including the BEGIN and END markers.
</Tip>

## Grant Role to Service User

Grant the `TIGHT_UPLOADER_ROLE` to your `TIGHT_UPLOADER_USER`:

<img src="https://mintcdn.com/tight-7c882d74/PBb8Gf8jW9PRt_Fg/integrations/analytics/snowflakeFiles/8.png?fit=max&auto=format&n=PBb8Gf8jW9PRt_Fg&q=85&s=a4099a87949e99c54dac5b83e85a5a0d" alt="Role Specification" width="958" height="473" data-path="integrations/analytics/snowflakeFiles/8.png" />

## Securely Share Access with Tight

Contact Tight directly at [api@tight.com](mailto:api@tight.com) for instructions on how to securely share:

* Snowflake account identifier (e.g., GSX\*\*\*-\*\*\*\*)
* Database name
* Schema name (typically PUBLIC)
* Stage name (e.g., TIGHT\_DATALAKE\_UPLOADS)
* Service user name (e.g., TIGHT\_UPLOADER\_USER)
* RSA private key file (`rsa_key.p8`)

Once configured, Tight will automatically begin uploading data files to your Snowflake stage based on your preferred schedule (daily, weekly, or monthly). Files are organized in a consistent directory structure within your stage, making it easy to integrate with your existing data pipelines and analytics tools.
