> For the complete documentation index, see [llms.txt](https://docs.coupler.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coupler.io/sources/category/files-and-tables/redshift.md).

# Redshift

Export Redshift tables, views, and SQL queries to Google Sheets, BigQuery, Data Studio, and AI tools with Coupler.io — no coding needed.

Redshift is Amazon's fully managed, petabyte-scale data warehouse service. With Coupler.io, you can automatically export data from your Redshift tables, views, or custom SQL queries to Google Sheets, Excel, BigQuery, Data Studio, or even AI destinations like Claude and ChatGPT — all on a schedule you control.

## Why connect Redshift to Coupler.io?

* **No code required** — Select a table or write a SQL query; Coupler.io handles the rest
* **Flexible exports** — Send data to spreadsheets, data warehouses, or AI platforms
* **Scheduled automation** — Set it and forget it; your data updates on your timeline
* **Transform as you go** — Use Join, Append, and Aggregate transformations to reshape your Redshift data before it lands in your destination

## Prerequisites

* An active Redshift cluster
* A Redshift user account with read access to the tables or schemas you want to export
* Host, port, database name, username, and password for your Redshift cluster
* Outbound access from your Redshift cluster to Coupler.io's IP addresses (your Coupler.io support team can provide these)

{% hint style="success" %}
**Quick start:** If you're exporting a single table or view, use the "Table or view" report type. If you need to filter, aggregate, or join data, use "Custom SQL" instead.
{% endhint %}

## How to connect

{% stepper %}
{% step %}
**Log in to Coupler.io** and create a new data flow. Click **Add source** and search for Redshift.
{% endstep %}

{% step %}
**Enter your Redshift connection details:**

* **Host** — Your Redshift cluster endpoint (e.g., `my-cluster.123456789.us-east-1.redshift.amazonaws.com`)
* **Port** — Default is `5439`
* **Database** — The database name you want to connect to
* **Username** — Your Redshift username
* **Password** — Your Redshift password

Click **Test connection** to verify the credentials work.
{% endstep %}

{% step %}
**Choose your report type:**

* Select **Table or view** if you want to export an entire table or materialized view. Then pick the schema and table name from the dropdowns.
* Select **Custom SQL** if you need to write a query to filter, aggregate, or join data. Paste your SQL query in the text field.
  {% endstep %}

{% step %}
**Select your destination.** Choose where your Redshift data should land — Google Sheets, Excel, BigQuery, Data Studio, Claude, ChatGPT, Cursor, Gemini, Perplexity, OpenClaw, or another supported platform.
{% endstep %}

{% step %}
**Run the data flow.** Click **Run** to execute a manual test. Coupler.io will fetch your data and send it to the destination. Once this completes successfully, you can set up a schedule.
{% endstep %}
{% endstepper %}

## Redshift data overview

Redshift is a queryable data warehouse, so the data you can export depends entirely on what tables, views, and schemas exist in your cluster.

## What data can you export?

Coupler.io connects directly to your Redshift cluster and can export:

* **Any table** — Public or private tables in any schema you have read access to
* **Any view** — Materialized or regular views
* **Custom query results** — The output of any SELECT statement you write

## Report types

| Report type       | Best for                                      | Output                                       |
| ----------------- | --------------------------------------------- | -------------------------------------------- |
| **Table or view** | One-to-one export of a Redshift table or view | All rows and columns from the selected table |
| **Custom SQL**    | Filtered, aggregated, or transformed data     | Results of your SQL query                    |

## Building custom SQL queries

### Filter data

```sql
SELECT * FROM sales WHERE region = 'EMEA' AND order_date >= '2024-01-01';
```

### Aggregate metrics

```sql
SELECT DATE_TRUNC('month', order_date) AS month, SUM(amount) AS total_revenue
FROM orders
GROUP BY DATE_TRUNC('month', order_date)
ORDER BY month DESC;
```

### Join multiple tables

```sql
SELECT c.customer_name, o.order_id, o.amount
FROM customers c
JOIN orders o ON c.customer_id = o.customer_id
WHERE o.order_date >= '2024-01-01';
```

### Window functions

```sql
SELECT customer_id, order_date, amount,
  ROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY order_date) AS order_rank
FROM orders;
```

## Common use cases

#### Sales dashboards

Export order, customer, and revenue data to Data Studio or Google Sheets for real-time sales tracking.

#### Finance reporting

Aggregate transaction data by account, region, or time period and send it to BigQuery for further analysis.

#### Customer insights

Join customer metadata with behavioral data and export to Claude or ChatGPT for AI-powered analysis.

#### Data warehouse consolidation

Use Coupler.io to combine Redshift data with data from other sources (Salesforce, Stripe, etc.) via Append or Join transformations.

## Platform-specific notes

* Redshift supports standard SQL syntax; if you're familiar with PostgreSQL, most queries will work directly
* Use `LIMIT` in your Custom SQL query to test large datasets before full export
* Redshift may compress or transform data types on export; verify column formats in your destination
* If your query returns more than 10 million rows, consider adding filters or aggregation to stay within destination limits
* Temporary tables (created with `CREATE TEMP TABLE`) are not accessible between connections; use permanent tables or views instead
* Redshift's `UNLOAD` command is not required — Coupler.io handles data extraction directly via SQL queries

## Redshift common issues

### Connection issues

<details>

<summary>Connection test fails with "timeout" or "could not connect"</summary>

Redshift clusters are often deployed in private VPCs. Coupler.io needs network access to reach your cluster.

**Solutions:**

* Confirm your Redshift cluster is publicly accessible (or has a public endpoint enabled)
* Verify the host, port, and database name are correct
* Check your Redshift security group allows inbound traffic on port 5439 (or your custom port)
* Ask your Coupler.io support team for the IP addresses to whitelist in your security group
* If your cluster is in a private VPC, consider using a public endpoint or an SSH tunnel (contact support)

</details>

<details>

<summary>"Invalid username or password" error</summary>

The credentials you entered don't match your Redshift user account.

**Solutions:**

* Double-check your Redshift username and password
* Verify the user has read access to the database and schema you're querying
* Confirm you're using the correct database name
* Reset your Redshift password in the AWS console and re-test

</details>

### Missing data

<details>

<summary>Data in Coupler.io doesn't match Redshift</summary>

If the data pulled into your destination differs from what you see in Redshift, several things could be at play.

**Solutions:**

* Run your SQL query directly in Redshift and verify the results match what Coupler.io exported
* Check for NULL values or unexpected data types in your columns
* Confirm no other processes are modifying your Redshift tables between the query and export
* If using a Custom SQL query with a WHERE clause, verify the filter conditions are correct
* Review your Coupler.io data flow logs for any warnings or truncation messages

</details>

<details>

<summary>Column values are NULL or blank in the destination</summary>

This can happen if your Redshift data contains NULL values or if there's a data type mismatch.

**Solutions:**

* Check your Redshift table for NULL values using `SELECT COUNT(*) FROM table WHERE column IS NULL`
* Use `COALESCE()` in your Custom SQL to replace NULLs with a default value: `SELECT COALESCE(column_name, 'N/A') FROM table`
* Verify column data types in Redshift match what your destination expects
* If using formulas in your destination (Google Sheets, Excel), test with non-NULL values first

</details>

<details>

<summary>Not pulling recent data</summary>

Your data flow might be querying a stale view or cached results.

**Solutions:**

* Confirm new data is actually being written to your Redshift table (check the `last_modified` or insertion timestamps)
* If using a materialized view, verify it's been refreshed recently
* Run a manual refresh of your data flow to trigger an immediate pull
* Check Coupler.io's data flow logs for any query errors or unexpected row counts
* If data is inserted into Redshift after your scheduled refresh time, adjust your schedule or add a slight delay

</details>

### Permission errors

<details>

<summary>"Permission denied" when querying a table</summary>

Your Redshift user account lacks read access to the table or schema.

**Solutions:**

* Verify your Redshift user has `SELECT` privileges on the table: `GRANT SELECT ON table_name TO user_name;`
* Confirm the schema is accessible: `GRANT USAGE ON SCHEMA schema_name TO user_name;`
* If the table is in a different schema, include the schema name in your query: `SELECT * FROM schema_name.table_name`
* Contact your Redshift administrator to grant the necessary permissions

</details>

### Data discrepancies

<details>

<summary>Data in preview doesn't match exported data</summary>

The preview in Coupler.io might show a subset of rows (often the first 100), while your full export contains all rows.

**Solutions:**

* This is expected behavior. The preview is a sample; the export includes all rows matching your query
* To verify, check the row count in your destination and compare it to the Redshift table row count
* If row counts differ significantly, review your Custom SQL query for unintended filters or joins

</details>

<details>

<summary>Numeric precision lost or decimals truncated</summary>

Data types in your destination (Google Sheets, Excel) may not support the full precision of Redshift's numeric columns.

**Solutions:**

* Use `CAST()` or `::` in your Custom SQL to convert high-precision numbers to text if needed: `SELECT amount::VARCHAR FROM orders`
* Check your destination's column format settings (e.g., decimal places in Excel)
* For very large or precise numbers, export as text to preserve full precision

</details>

### Rate limits

<details>

<summary>Data flow times out or runs slowly</summary>

Redshift queries can time out if they're complex, access very large tables, or run during peak cluster usage.

**Solutions:**

* Add a `LIMIT` clause to your Custom SQL to test with a smaller dataset first
* Add filters or WHERE clauses to reduce the number of rows returned
* Check your Redshift cluster's CPU and memory usage; consider scaling up if usage is high
* Run the data flow during off-peak hours
* If your query involves large joins or aggregations, test it directly in Redshift first to measure execution time
* For tables with millions of rows, consider using Redshift's `SORTKEY` and `DISTKEY` settings to optimize query performance

</details>

{% hint style="danger" %}
**10 million cell limit:** Coupler.io has a limit of 10 million cells per data flow. If your Redshift query returns more rows or columns than this threshold allows, consider filtering your data or splitting it into multiple data flows.
{% endhint %}

## Redshift FAQ

<details>

<summary>Can I connect to a Redshift cluster in a private VPC?</summary>

Redshift clusters in private VPCs are not directly accessible from the internet. However, there are a few options:

* Enable a public endpoint for your cluster (then use the standard connection method)
* Use an SSH tunnel or bastion host to bridge the connection (contact Coupler.io support for assistance)
* Use a VPN to make the cluster accessible

Talk to your Coupler.io support team about which option works best for your setup.

</details>

<details>

<summary>Can I use a Custom SQL query with JOIN or UNION?</summary>

Yes, absolutely. Custom SQL in Coupler.io supports the full range of Redshift's SQL syntax, including JOINs, UNIONs, CTEs (WITH clauses), window functions, and aggregations. Just paste your query and click **Test** to verify it works.

</details>

<details>

<summary>How do I export only recent data (last 30 days, this month, etc.)?</summary>

Use date functions in your Custom SQL query. Here are some common patterns:

```sql
-- Last 30 days
SELECT * FROM orders WHERE order_date >= CURRENT_DATE - 30

-- Current month
SELECT * FROM orders WHERE DATE_TRUNC('month', order_date) = DATE_TRUNC('month', CURRENT_DATE)

-- Last week
SELECT * FROM orders WHERE order_date >= CURRENT_DATE - 7
```

These queries use Redshift's current date, so they dynamically adjust each time the data flow runs.

</details>

<details>

<summary>Can I combine Redshift data with data from other sources?</summary>

Yes. After creating a Redshift data flow, you can add a second source (Salesforce, Stripe, Google Ads, etc.) to the same data flow. Then use Coupler.io's **Append** transformation to merge rows from both sources, or **Join** to combine data by a common key. Learn more in the Coupler.io transformations documentation.

</details>

<details>

<summary>What happens if my Redshift query returns NULL values?</summary>

NULL values will be exported as-is to your destination (blank cells in Google Sheets or Excel, NULLs in BigQuery, etc.). If you want to replace NULLs with a default value, use the `COALESCE()` function in your Custom SQL:

```sql
SELECT id, COALESCE(email, 'Not provided') AS email FROM customers
```

Alternatively, if you're working in Google Sheets or Excel, you can clean up NULLs after import using formulas.

</details>

<details>

<summary>How many rows can I export?</summary>

Coupler.io has a limit of **10 million cells** per data flow (not rows). The exact row limit depends on your column count. For example:

* 100 columns × 100,000 rows = 10 million cells ✓
* 10 columns × 1 million rows = 10 million cells ✓
* 5 columns × 2.1 million rows = 10.5 million cells ✗

If you hit this limit, filter your query or split the data across multiple data flows.

</details>

<details>

<summary>Can I schedule my data flow to run every hour, or only daily?</summary>

Scheduling options depend on your Coupler.io plan. You can typically schedule data flows to run at intervals ranging from hourly to weekly. Check your plan's features or contact support to confirm what's available.

</details>

<details>

<summary>How do I know if my data flow ran successfully?</summary>

After you schedule a data flow, Coupler.io displays the run history in your dashboard. Each run shows:

* Start and end times
* Status (Success, Failed, Timeout)
* Row count (if successful)

Click on a run to see detailed logs, including any errors or warnings. You can also enable email notifications for failed runs.

</details>

<details>

<summary>Can I use Redshift data as input for an AI model like Claude or ChatGPT?</summary>

Yes. Coupler.io supports AI destinations including Claude, ChatGPT, Cursor, Gemini, Perplexity, and OpenClaw. Export your Redshift data to one of these platforms for analysis, summarization, or other AI-powered tasks. Your data flow will send the query results directly to the AI model.

</details>

{% hint style="info" %}
For more details on available transformations, visit the **Best Practices** section. For detailed data structure information, see **Data Overview**. If you encounter errors, check **Common Issues** for troubleshooting steps.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.coupler.io/sources/category/files-and-tables/redshift.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
