> AI agents: this is one page from Mammoth Analytics documentation. The index of all pages as Markdown is https://mammoth.io/docs/llms.txt. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get Markdown.

# Connect Amazon Redshift to Mammoth and import tables

> Connect Mammoth to an Amazon Redshift cluster on port 5439, query tables with SQL, and save datasets that add only new rows on a daily schedule.

The Amazon Redshift connector imports a table, or the result of your own SQL query, from a Redshift cluster into Mammoth as a dataset. It connects through a connection form, then opens in the connector workspace's SQL view. Open it from **Data Library** > **New dataset** > **Connectors** and click **Amazon Redshift**. Project Admins create the connection; Project Editors can start datasets from a connection the project already has. Which connectors you can add depends on your plan.

## What you can bring in from Redshift

- Any table the database user can read.
- The result of your own `SELECT` query.

AI query writing (**Write SQL**) isn't available for Redshift. Redshift supports a key column, so a refresh can add only new rows.

## Before you connect Amazon Redshift

You need:

- A Redshift cluster reachable from the internet.
- A database user with `SELECT` access to the tables you want to import.
- The cluster's endpoint hostname, port (default `5439`), database name, username and password.
- Mammoth's IP address allowed in the cluster's security group. The connection form shows the address. See [Allow Mammoth through your firewall](https://mammoth.io/docs/learn/get-data-in/network-requirements/).

## Connect Amazon Redshift to Mammoth

1. Go to the **Data Library**, click **New dataset**, and choose **Connectors**.
2. Search for **Amazon Redshift** and click its tile. The connection form opens. See [Connect a database or app](https://mammoth.io/docs/learn/get-data-in/connect-a-source/) for the shared steps.
3. Fill in the connection form (see the table below).
4. Click **Connect**. The connector workspace opens on your tables.

| Field | What to enter |
| --- | --- |
| **Host URL** | The cluster endpoint hostname |
| **Port** | Default `5439` |
| **Username** | Database user with read access |
| **Password** | That user's password |
| **Database** | Name of the database to read |
| **Display Name** | Optional label for this connection in Mammoth |



## Query a Redshift table in the SQL view

1. In **Tables**, click a table. Mammoth opens its rows with the `SELECT` query that read them.
2. To change what you import, click **Edit SQL**, edit the query, and click **Run** (or press Ctrl+Enter).
3. To keep only some columns, tick them in the table header.

[Connect a database or app](https://mammoth.io/docs/learn/get-data-in/connect-a-source/) covers the SQL view and each refresh option.

## Save Redshift data as a dataset

1. Click **Save as dataset**.
2. Enter a **Name** and choose a folder under **Save in**.
3. Under **Keep it up to date**, choose **Daily at 06:00** or **Only when I ask**.
4. Under **On each refresh**, click **Change** and pick **Replace all rows** (the default), **Add only new rows** or **Keep only the newest rows**. **Add every row again** shows instead of **Add only new rows** when the query has no column that can serve as a key column.
5. Click **Save as dataset**. When the dataset is ready, click **Open dataset**.

## Refresh Redshift data and add only new rows

Choosing **Daily at 06:00** creates a [Dataset Refresh](https://mammoth.io/docs/learn/automate/refresh-a-dataset/) automation that you can reschedule later.

After you save, the dataset's **Update method** offers:

| Update method | What it does |
| --- | --- |
| **Replace all data** | Rebuilds the dataset from the source on every refresh |
| **Add new rows only** | Keeps your rows and adds rows above the last value of a **Key column** |
| **Keep only the newest rows** | Empties the dataset, then brings in rows since the last refresh |

Pick a key column whose values only go up, such as an ID or a date.

## Troubleshoot Redshift connections

| Symptom | Likely cause | Fix |
| --- | --- | --- |
| Connection fails | The security group blocks Mammoth, or the cluster isn't public | Allow Mammoth's IP address in the cluster's security group, and check the cluster is publicly reachable |
| A table is missing | The user lacks `SELECT` on it | Grant the database user `SELECT` on the table |

## Related

- [Connect a database or app](https://mammoth.io/docs/learn/get-data-in/connect-a-source/): the shared connector workspace steps and refresh options.
- [Allow Mammoth through your firewall](https://mammoth.io/docs/learn/get-data-in/network-requirements/): the IP address to allow.
- [Manage saved connections](https://mammoth.io/docs/learn/get-data-in/connections/): edit, reuse or delete this connection.
- [Refresh a dataset](https://mammoth.io/docs/learn/automate/refresh-a-dataset/): change when the dataset refreshes.
- [Speed up pipelines and connectors](https://mammoth.io/docs/learn/help/performance/): incremental refresh for large tables.

---
Source: https://mammoth.io/docs/learn/get-data-in/connectors/redshift.md · Updated: 2026-11-08
