# Amazon Redshift

AWS cloud data warehouse

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

Lets you and Hamming query an Amazon Redshift database with SQL, with its tables listed in Trace.

## What Phloem reads
- Tables in every user schema — columns, types, row counts, size and foreign keys — listed in Trace for Hamming and SQL autocomplete
- Views are not listed, but you can still query them by name

## What you need
- The cluster endpoint and port (default `5439`), reachable from Phloem
- The database name and a database user
- The user's password, or for IAM sign-in, the cluster identifier and AWS region

## Connect
1. In the console, open **Connectors**, choose **Add connector**, then **Amazon Redshift**.
2. Under **Authentication Method**, choose **Username & Password** or **IAM Authentication**.
3. Enter **Host**, **Port**, **Database** and **Username**.
4. Enter **Password**, or for IAM, **Cluster Identifier** and **AWS Region**.
5. Optional: **Schema** (default `public`).
6. Choose **Test Connection**, then **Create Connection**.

## What Hamming can do
- Run SQL that you or Hamming write

## Notes
- Phloem connects over SSL.
- If the test reports a refused connection or a timeout, the cluster's security group probably does not let Phloem in.
- Phloem runs any statement, not only `SELECT`. Connect as a read-only user to keep the connector read-only.

## Connection fields

| Field | Type | Required | Notes |
|---|---|---|---|
| Host | Text | Yes |  |
| Port | Number | No |  |
| Database | Text | Yes |  |
| Username | Text | Yes |  |
| Password | Secret | No |  |
| Cluster Identifier | Text | No | Required for IAM authentication |
| AWS Region | Text | No | AWS region for IAM auth |
| Schema | Text | No | Default schema |
