Skip to main content
Version: Next

Amazon Redshift Data Connector

Amazon Redshift is a columnar OLAP database compatible with PostgreSQL. To connect Redshift to Spice, use the PostgreSQL data connector and specify the Redshift cluster connection parameters.

Configuration

from

Use the format postgres:schema.table to reference a Redshift table. The connector parameters should match your Redshift cluster settings.

Example Spicepod

version: v1beta1
kind: Spicepod
name: tpch-read
datasets:
- from: postgres:public.customer
name: customer
params:
pg_host: ${secrets:PG_HOST}
pg_port: 5439
pg_sslmode: prefer
pg_db: dev
pg_user: ${secrets:PG_USER}
pg_pass: ${secrets:PG_PASS}
acceleration:
enabled: true

- from: postgres:public.lineitem
name: lineitem
params:
pg_host: ${secrets:PG_HOST}
pg_port: 5439
pg_sslmode: prefer
pg_db: dev
pg_user: ${secrets:PG_USER}
pg_pass: ${secrets:PG_PASS}
acceleration:
enabled: true

- from: postgres:public.nation
name: nation
params:
pg_host: ${secrets:PG_HOST}
pg_port: 5439
pg_sslmode: prefer
pg_db: dev
pg_user: ${secrets:PG_USER}
pg_pass: ${secrets:PG_PASS}
acceleration:
enabled: true

- from: postgres:public.orders
name: orders
params:
pg_host: ${secrets:PG_HOST}
pg_port: 5439
pg_sslmode: prefer
pg_db: dev
pg_user: ${secrets:PG_USER}
pg_pass: ${secrets:PG_PASS}
acceleration:
enabled: true

- from: postgres:public.part
name: part
params:
pg_host: ${secrets:PG_HOST}
pg_port: 5439
pg_sslmode: prefer
pg_db: dev
pg_user: ${secrets:PG_USER}
pg_pass: ${secrets:PG_PASS}
acceleration:
enabled: true

- from: postgres:public.partsupp
name: partsupp
params:
pg_host: ${secrets:PG_HOST}
pg_port: 5439
pg_sslmode: prefer
pg_db: dev
pg_user: ${secrets:PG_USER}
pg_pass: ${secrets:PG_PASS}
acceleration:
enabled: true

- from: postgres:public.region
name: region
params:
pg_host: ${secrets:PG_HOST}
pg_port: 5439
pg_sslmode: prefer
pg_db: dev
pg_user: ${secrets:PG_USER}
pg_pass: ${secrets:PG_PASS}
acceleration:
enabled: true

- from: postgres:public.supplier
name: supplier
params:
pg_host: ${secrets:PG_HOST}
pg_port: 5439
pg_sslmode: prefer
pg_db: dev
pg_user: ${secrets:PG_USER}
pg_pass: ${secrets:PG_PASS}
acceleration:
enabled: true

Parameters

Parameter NameDescription
pg_connection_stringOptional. A PostgreSQL connection string. Overrides individual connection parameters when provided.
pg_hostHostname or IP address of the Redshift cluster
pg_portPort for Redshift (default: 5439)
pg_dbDatabase name
pg_userUsername for authentication
pg_passPassword for authentication (use secret reference)
pg_sslmodeSSL mode (e.g., prefer, require, verify-ca, verify-full)
pg_sslrootcertOptional. Path to a custom root certificate for SSL verification
pg_connection_pool_min_idleOptional. The minimum number of idle connections to keep open in the pool. Default is 1.
connection_pool_sizeOptional. The maximum number of connections in the connection pool. Default is 5.

Supported Types

Redshift types are mapped to PostgreSQL types. See the PostgreSQL connector documentation for details on supported types and configuration.

Secrets

Spice integrates with multiple secret stores to help manage sensitive data securely. For details, see the secret stores documentation and using referenced secrets guide.

References