# Connect Snowflake

Connect Snowflake to Justwon, see what Justwon reads and may do, and disconnect it.

## Before you start

- **In Justwon:** you must be an owner or an admin of the workspace. A Snowflake connection belongs to the whole workspace. See [Roles](https://justwon.ai/docs/get-started/roles).
- **Your credential:** In Snowflake, create a service user for Justwon that signs in with a key pair, and give it read access to the database and warehouse it should query. The connect form lists each value it needs.

## Connect

1. Sign in to https://app.justwon.ai and open **Integrations**.
2. Open the **Available** tab, find **Snowflake** and select it. Its card says **Connect**.
3. Fill in the form, then select **Connect**. It asks for these values:
   - **Account Identifier**. Found in your Snowflake URL: [account].snowflakecomputing.com
   - **Service Account Username**.
   - **Database**.
   - **Warehouse**.
   - **Role** (optional).
   - **Private Key (PEM)**. Paste the entire PEM-encoded private key including the header and footer lines.
   - **Private Key Passphrase** (optional).

Justwon does not read Snowflake on a schedule. It queries it when a question needs the figures.

## What Justwon reads

Justwon reads product usage and revenue figures from your Snowflake warehouse, by running queries when a question needs them.

## What Justwon may do

Nothing. Justwon only reads from Snowflake; it never changes anything there.

## Disconnect

1. Open **Integrations** and the **Connected** tab, and select the Snowflake connection.
2. Open the **Configuration** tab. Under **Disconnecting**, select the button for Snowflake, then select **Disconnect**.

Reading stops and the connection is removed. What stays and what goes is the same for every tool: see [Where your data is held](https://justwon.ai/docs/security/where-your-data-is-held). Remove the key or token you created in Snowflake too, so nothing is left that could be used.

## If the connection does not finish

- **Snowflake says the credential is wrong.** Create it again and paste it without spaces before or after. Check that it belongs to an account that can see the data Justwon reads.
- **The connection stops later and asks you to reconnect.** The credential was removed or has expired. Select the connection and reconnect it with a new one. The configuration and everything already read are kept. See [a connection that is stuck](https://justwon.ai/docs/troubleshooting/connection-stuck).
