Amazon Redshift

This guide walks you through connecting Amazon Redshift to Solid so you can get insights into your data lineage, usage, and quality.

Overview

Solid requires access to:

  • The schema of your Redshift databases
  • Query history from system views (STL_QUERY, STL_QUERYTEXT)
  • Read-only grants on your data — required for Solid's Text2SQL engine to generate and validate SQL

Note: You will need superuser access (or an equivalent admin role) to create the Solid user and role.

You have two options for connecting Redshift to Solid:

OptionBest ForWhat You'll Do
Automatic Pull (Recommended)Ongoing use and continuous monitoringCreate a service user that runs automatically
Manual PullQuick proof of concept or one-time setupExport data manually and upload it

What Is Collected

CategoryWhatWhy
MetadataTable/column definitions, data types, constraintsTo build the data catalog
Query HistoryQuery text, executing user, timestamps, durationTo learn usage patterns and seed benchmarks
Table UsageRow insert/update/delete counts per tableTo surface active tables and detect stale data
Data ProfilingSampled column values (via granted SELECT)Required for Text2SQL generation/validation, and to improve SQL filter accuracy

Automatic Pull (Recommended)

Best for: Production use with continuous monitoring and updates.

Step 1: Create the Solid User and Role

Run this script while connected as a superuser (or equivalent admin role):

-- Create a dedicated user for Solid
CREATE USER solid_data PASSWORD '{strong_password}';

-- Create a role scoped to metadata and read access
CREATE ROLE solid_data_role;

-- Grant usage on the schemas you want Solid to monitor
GRANT USAGE ON SCHEMA {schema_name} TO ROLE solid_data_role;

-- Grant read access to tables and views in those schemas — required for
-- Solid's Text2SQL engine to generate and validate SQL
GRANT SELECT ON ALL TABLES IN SCHEMA {schema_name} TO ROLE solid_data_role;

-- Allow visibility into system catalog and query history views
GRANT SELECT ON ALL TABLES IN SCHEMA pg_catalog TO ROLE solid_data_role;

-- Attach the role to the Solid user
GRANT ROLE solid_data_role TO solid_data;

Repeat the GRANT USAGE / GRANT SELECT pair for every schema you want Solid to monitor.

Step 2: Note Your Connection Details

You'll need:

  • Cluster endpoint (or Redshift Serverless workgroup endpoint)
  • Port (default 5439)
  • Database name
  • Username: solid_data
  • Password: the password you set above

Step 3: Configure Solid

  1. Log into the Solid platform
  2. Navigate to Settings → Integrations → Redshift
  3. Enter your connection details and credentials
  4. Click Test Connection
  5. Select which schemas you want Solid to monitor
  6. Click Save

Solid will begin syncing your Redshift metadata and query history.


Manual Pull

Best for: Testing Solid or if you can't grant direct database access yet.

Steps

  1. Run the queries below in the Redshift Query Editor
  2. Export each result as a CSV file
  3. Upload to the Solid Azure Storage container

Metadata

SELECT
    c.table_schema,
    c.table_name,
    c.column_name,
    c.ordinal_position,
    c.data_type,
    c.is_nullable,
    c.column_default
FROM information_schema.columns c
WHERE c.table_schema IN ({schema_list})
ORDER BY c.table_schema, c.table_name, c.ordinal_position;

Query History

SELECT
    q.query,
    q.userid,
    q.starttime,
    q.endtime,
    t.text AS query_text
FROM stl_query q
JOIN stl_querytext t ON q.query = t.query
WHERE q.starttime > '{last_collect_time}'
ORDER BY q.starttime DESC;

Permissions Needed

Permission/GrantPurpose
solid_data_role (role)Dedicated role scoping Solid's metadata and read access
GRANT USAGE ON SCHEMA {schema_name}Lets Solid see objects within a monitored schema
GRANT SELECT ON ALL TABLES IN SCHEMA {schema_name}Read access to tables/views — required for Solid's Text2SQL engine to generate and validate SQL
GRANT SELECT ON ALL TABLES IN SCHEMA pg_catalogVisibility into system catalog and query history views
GRANT ROLE solid_data_role TO solid_dataAttaches the role's permissions to the Solid service user

Troubleshooting

Connection Issues

  1. Verify the cluster/workgroup endpoint and port are correct and reachable from Solid's network
  2. Confirm the user isn't locked and the password hasn't expired
  3. Check your security group / VPC rules allow inbound connections from Solid's static IP addresses

Permission Issues

  1. Check the role's grants:
    SELECT * FROM svv_table_privileges WHERE grantee = 'solid_data_role';
  2. Confirm GRANT USAGE ON SCHEMA was run for every schema you want monitored — SELECT grants alone aren't sufficient without schema-level USAGE

Security Notes

  • The service user has read-only access — no INSERT, UPDATE, DELETE, or DDL privileges
  • Use a strong, unique password and rotate it per your organization's policy
  • Restrict Redshift's port (5439) to Solid's static IP addresses via your security group rules
  • Scope grants only to the schemas Solid needs to monitor

Did this page help you?