How to Connect Redshift to Tableau in PostgreSQL

Galaxy Glossary

How do I connect Amazon Redshift to Tableau?

Securely establish a live or extract connection between Amazon Redshift and Tableau for fast, interactive analytics.

Sign up for the latest in SQL knowledge from the Galaxy Team!
Welcome to the Galaxy, Guardian!
Oops! Something went wrong while submitting the form.

Description

Why connect Amazon Redshift to Tableau?

Visualizing Redshift data in Tableau lets analysts explore large datasets without writing extensive SQL. Tableau’s optimized Redshift connector streams results through the JDBC driver, enabling interactive dashboards on billions of rows.

What prerequisites are required?

Ensure you have Tableau Desktop 2021.4+ or Tableau Cloud, an Amazon Redshift cluster, the Redshift JDBC/ODBC driver (bundled with Tableau), inbound TCP 5439 open in the cluster’s security group, and database credentials with SELECT on the target schema.

How do I get the connection details from Redshift?

In the AWS console, open Amazon Redshift → Clusters → YourCluster → Properties. Copy the Endpoint (for example redshift-demo.abc123.us-east-1.redshift.amazonaws.com) and note the Port (5439), Database name, and IAM/Password user.

How do I create the connection in Tableau Desktop?

Step 1 — Launch the connector

Open Tableau → Connect → To a Server → Amazon Redshift.

Step 2 — Enter credentials

Fill in Server, Port, Database, Username, and Password. Optionally check “Require SSL”. Click “Sign In”.

Step 3 — Select schema and tables

In the Data Source tab choose the ecommerce schema, drag Orders, Customers, and OrderItems to the canvas, and set joins.

How to verify the connection with a sample query?

Use the “New Custom SQL” option and paste the sample query below. Click the Preview button; Tableau should show a small result set instantly, confirming that the driver, permissions, and network are correct.

What are best practices for performance?

Create sort keys on date columns, use extract filters to reduce row counts, enable query result caching in Redshift, aggregate in database with Custom SQL, and monitor long-running queries in STL_QUERY.

Why How to Connect Redshift to Tableau in PostgreSQL is important

How to Connect Redshift to Tableau in PostgreSQL Example Usage


-- Custom SQL in Tableau after connection
SELECT
  c.name,
  o.order_date,
  SUM(oi.quantity * p.price) AS order_total
FROM Orders o
JOIN Customers c   ON c.id = o.customer_id
JOIN OrderItems oi ON oi.order_id = o.id
JOIN Products p    ON p.id = oi.product_id
WHERE o.order_date >= CURRENT_DATE - INTERVAL '30 days'
GROUP BY c.name, o.order_date
ORDER BY order_total DESC
LIMIT 10;

How to Connect Redshift to Tableau in PostgreSQL Syntax


psql \
  --host=<endpoint> \
  --port=5439 \
  --username=<user> \
  --dbname=<database>

# JDBC (used by Tableau under the hood)
jdbc:redshift://<endpoint>:5439/<database>?ssl=true

Common Mistakes

Frequently Asked Questions (FAQs)

Does Tableau require a separate driver for Redshift?

No. Tableau bundles the latest tested JDBC driver. Updating it manually is rarely necessary unless AWS releases a critical patch.

Can I use IAM authentication instead of a database password?

Yes. Select “Sign in using AWS” in the connector and supply an AWS access key or assume-role credentials. Ensure the role has redshift:GetClusterCredentials.

How do extracts differ from live connections?

Extracts copy data into Tableau’s .hyper file, improving speed and enabling offline use, but they require scheduled refreshes to remain current. Live connections query Redshift every time.

Want to learn about other SQL terms?

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie
BauHealth Logo
Truvideo Logo
Welcome to the Galaxy, Guardian!
Oops! Something went wrong while submitting the form.