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

# Redshift Integration

> Import data from Amazon Redshift to sync product usage, custom fields, and custom objects into Statisfy.

### Connect Redshift with Statisfy

The Redshift integration lets you import data from your Amazon Redshift cluster into Statisfy. Sync product usage metrics, account-level custom fields, and custom objects from the same warehouse you use for analytics.

Redshift is PostgreSQL wire-compatible, so the connection model and configuration UX mirror the [PostgreSQL integration](/integrations/postgresql) — the differences are around schema introspection and the SQL dialect Statisfy uses to validate your queries.

You can find the shared self-serve concepts — query types, resolvers, transformers, schedules, configuration history — in [Integration Concepts](/integrations/self_serve_configuration). This page focuses on what's specific to Redshift.

**Prerequisites:**

* **Admin access** to Statisfy
* A Redshift cluster reachable from Statisfy's egress IPs (see [Network Access](#network-access) below)
* A Redshift database user with `SELECT` access on the schemas/tables you want to sync

### What You Can Import

| Data Type          | Description                     | Use Case                                |
| ------------------ | ------------------------------- | --------------------------------------- |
| **Product Usage**  | Usage metrics and adoption data | Track MAU, API calls, feature usage     |
| **Custom Fields**  | Account-level attributes        | Sync industry, segment, scores from BI  |
| **Custom Objects** | Domain-specific records         | Sync subscriptions, orders, deployments |

### Steps to Connect

1. **Log in to Statisfy.**

2. Navigate to: **Integrations → Admin Apps → Redshift → Connect**

3. Enter your Redshift credentials:
   * **Host** — Cluster endpoint (e.g., `my-cluster.abc123.us-east-1.redshift.amazonaws.com`)
   * **Port** — Default `5439`
   * **Database** — Target database name
   * **Username** — Service account username
   * **Password** — Service account password

4. Click **Test Connection** to confirm Statisfy can reach the cluster and authenticate.

5. Once connected, Redshift will appear as **Connected** on the Integrations page.

### Configure Queries

Redshift uses the same self-serve configuration UI as the other warehouse integrations. Open **Integrations → Redshift → Settings** to:

* **Browse schemas and tables** in your cluster
* **Author queries** with autocomplete and a preview pane
* **Map results** to Statisfy entities — accounts (via Statisfy account ID, CRM ID, organization ID, email domain, account name, or any custom field), product usage metrics, custom fields, or custom objects
* **Set the schedule** — daily, weekly, or monthly cadence with an optional week-start-day override

Each saved query can be one of three types:

| Query Type      | Output                          |
| --------------- | ------------------------------- |
| `product_usage` | Time-series metrics per account |
| `custom_field`  | Account-level attribute values  |
| `custom_object` | Records of a custom object type |

Queries are validated against the Redshift dialect before they run, and a preview against your cluster lets you confirm the result shape before scheduling.

### Account Matching

Each query specifies how its rows map to Statisfy accounts via an **account resolver**:

| Resolver                | Description                              |
| ----------------------- | ---------------------------------------- |
| **Statisfy Account ID** | Native Statisfy account identifier       |
| **CRM Account ID**      | Salesforce or HubSpot account identifier |
| **Organization ID**     | External org identifier                  |
| **Email Domain**        | Company website domain                   |
| **Account Name**        | Company name (fuzzy matching)            |
| **Custom Field**        | Any custom field defined on accounts     |

<Warning>
  Rows that don't resolve to an existing Statisfy account are skipped. Make sure the resolver column matches values already present in Statisfy.
</Warning>

### Sync Behavior

**Scheduled Jobs:**

* Each query runs on the cadence you configure (daily / weekly / monthly).
* Self-serve configuration is read first; if no self-serve config is found for a query type, Statisfy falls back to any hardcoded mapping previously set up by support.

**Error Handling:**

* Per-query errors are logged but do not block other queries from running.
* Invalid rows within a query are skipped and reported in the job audit log.

### Network Access

If your Redshift cluster is in a private VPC or has IP allowlisting enabled, allow Statisfy's egress IPs:

```text theme={null}
35.203.185.27
35.197.52.231
```

### Security

* Credentials are stored encrypted in Google Cloud Secret Manager.
* All connections use SSL.
* Queries authored in the Settings page are validated and parameterized — they cannot mutate your warehouse.
* Access is scoped to the database user you provide — grant `SELECT` only on the schemas you want Statisfy to read.

### Troubleshooting

<Accordion title="Connection test fails">
  **Check network access:**

  * Verify the cluster is reachable from the Statisfy egress IPs above
  * Confirm the security group allows inbound traffic on the Redshift port (default `5439`)

  **Check credentials:**

  * Verify host, port, database, username, and password
  * Confirm the user has `CONNECT` privilege on the database
</Accordion>

<Accordion title="Schema or tables not visible in the browser">
  * Confirm the database user has `USAGE` on the schema and `SELECT` on the tables
  * System schemas (`pg_catalog`, `information_schema`, `pg_toast`, `pg_internal`) are intentionally hidden
</Accordion>

<Accordion title="Query validation errors">
  * Statisfy validates queries against the Redshift dialect before saving — Postgres-specific syntax that Redshift doesn't support will be flagged
  * Check the validation error for the offending function or syntax and adjust to a Redshift-supported equivalent
</Accordion>

<Accordion title="Records not matching to accounts">
  * Verify the resolver column contains values that exist in Statisfy
  * For CRM ID resolvers, confirm your CRM integration has synced the matching accounts
  * Try a different resolver (for example, switch from account name to email domain) if matching is unreliable
</Accordion>

### Need Help?

For initial setup, query design, or troubleshooting, contact [support@statisfy.com](mailto:support@statisfy.com).
