Skip to content
Learn › Get data in › Connectors: open the docs menu

Connect Amazon Redshift to Mammoth and import tables

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.

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 for the shared steps.
  3. Fill in the connection form (see the table below).
  4. Click Connect. The connector workspace opens on your tables.
FieldWhat to enter
Host URLThe cluster endpoint hostname
PortDefault 5439
UsernameDatabase user with read access
PasswordThat user's password
DatabaseName of the database to read
Display NameOptional 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 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 automation that you can reschedule later.

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

Update methodWhat it does
Replace all dataRebuilds the dataset from the source on every refresh
Add new rows onlyKeeps your rows and adds rows above the last value of a Key column
Keep only the newest rowsEmpties 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

SymptomLikely causeFix
Connection failsThe security group blocks Mammoth, or the cluster isn't publicAllow Mammoth's IP address in the cluster's security group, and check the cluster is publicly reachable
A table is missingThe user lacks SELECT on itGrant the database user SELECT on the table
Was this page helpful?

Something wrong? support@mammoth.io