# Snowflake

Cloud data warehouse

- Category: Data warehouses
- Runs in: the Phloem cloud

Lets you and Hamming query a Snowflake database with SQL, with its tables listed in Trace.

## What Phloem reads
- Base tables in every schema — columns, types, comments, row counts and size — listed in Trace for Hamming and SQL autocomplete
- `INFORMATION_SCHEMA` is left out. Views are not listed, but you can still query them by name.

## What you need
- Your account identifier (e.g. `xy12345.us-east-1`)
- A warehouse to run queries on, and the database to read
- A Snowflake user with a password, or with an RSA key pair registered to it
- Optional: the role to connect as

## Connect
1. In the console, open **Connectors**, choose **Add connector**, then **Snowflake**.
2. Under **Authentication Method**, choose **Username & Password** or **Key Pair (RSA)**.
3. Enter **Account Identifier**, **Warehouse**, **Database** and **Username**.
4. Enter **Password**. Or, for a key pair, paste the PEM key into **Private Key (PEM)**, plus **Private Key Passphrase** if the key is encrypted.
5. Optional: **Role**, and **Schema** (default `PUBLIC`).
6. Choose **Test Connection**, then **Create Connection**.

## What Hamming can do
- Run SQL that you or Hamming write, on the **Warehouse** you entered, using its compute

## Notes
- Phloem runs any statement, not only `SELECT`. Connect with a read-only **Role** to keep the connector read-only.

## Connection fields

| Field | Type | Required | Notes |
|---|---|---|---|
| Account Identifier | Text | Yes | Snowflake account identifier |
| Warehouse | Text | Yes | Compute warehouse name |
| Database | Text | Yes |  |
| Username | Text | Yes |  |
| Password | Secret | No |  |
| Private Key (PEM) | Text | No | PEM-encoded private key |
| Private Key Passphrase | Secret | No | Passphrase for encrypted private key (optional) |
| Role | Text | No | Snowflake role (optional) |
| Schema | Text | No | Default schema |
