Amazon Redshift Driver v1.9.0¶
Driver Version v1.9.0 Release Date 2026-11-10 Tested With Amazon Redshift aws
This driver provides access to Amazon Redshift (commonly referred to as just “Redshift”).
Note
This project is not affiliated with Amazon.
Installation¶
The Redshift driver can be installed with dbc :
dbc install redshift
Connecting¶
To connect, edit the uri, redshift.cluster_type, redshift.workgroup_name, and redshift.db_name options below to match your environment and run the following:
from adbc_driver_manager import dbapi
dbapi.connect(
driver="redshift",
db_kwargs={
"uri": "postgresql://localhost:5439",
# "uri": "postgresql://<cluster hostname>:<cluster port>", # for direct connection
"redshift.cluster_type": "redshift-serverless", # for Redshift Serverless
# "redshift.cluster_type": "redshift-iam", # for Redshift Provisioned with IAM auth
# "redshift.cluster_type": "redshift", # for Redshift Provisioned with user/password auth
"redshift.workgroup_name": "<WORKGROUP_NAME>", # for Redshift Serverless
# "redshift.cluster_identifier": "<CLUSTER IDENTIFIER>", # for Redshift Provisioned
"redshift.db_name": "sample_data_dev",
},
)
Note: The example above is for Python using the adbc-driver-manager package but the process will be similar for other driver managers.
Connection String Format¶
Connection strings are passed with the uri option. Redshift’s URI syntax supports two primary forms:
Explicit endpoint, for direct connections or standard user/password authentication:
redshift://[user[:password]@]host[:port]/dbname[?param1=value1¶m2=value2]
Endpoint discovery, for IAM authentication and serverless connections:
redshift:///dbname[?param1=value1¶m2=value2]
Note the triple slash (
///). This indicates an empty host, signaling the driver to discover the endpoint using the provided query parameters (e.g.,cluster_identifierorworkgroup_name).
Components:
Scheme: redshift:// (required)
User/Password: Optional (for standard user/password authentication with
cluster_type=redshift)Ignored if cluster_type is
redshift-serverlessIf cluster_type is
redshift-iam, then if omitted, the driver will log in with the current IAM identity; else it will fetch credentials for the given usernameFor cluster_type
redshift, the driver will fetch credentials for the given username
Host/Port: The Redshift cluster endpoint (e.g., my-cluster.c…com:5439)
If omitted (using redshift:///), the driver will discover this using the AWS SDK
Database: Required (e.g., /dev)
Query Parameters: Configuration options
See Amazon Redshift JDBC Connection URL for connection URL format and Amazon Redshift JDBC Configuration Options for complete parameter reference.
Note
Reserved characters in URI elements must be URI-encoded. For example, @ becomes %40.
Examples:
redshift://admin_user:secret@my-cluster.region.redshift.amazonaws.com:5439/dev
redshift:///dev?cluster_type=redshift-iam&cluster_identifier=my-cluster
redshift:///dev?cluster_type=redshift-serverless&workgroup_name=my-workgroup
redshift://admin:pass@localhost:5439/dev?sslmode=disable
redshift:///dev?cluster_type=redshift-serverless&workgroup_name=my-workgroup&aws_region=us-west-1&aws_access_key_id=AKIA…&aws_secret_access_key=secret
redshift:///dev?cluster_type=redshift-iam&cluster_identifier=my-cluster&auth_provider=BrowserIdcAuthPlugin&idc_region=us-east-1&issuer_url=https://example.com
redshift:///dev?cluster_type=redshift&cluster_identifier=my-cluster&username=newuser&auto_create_user=true
The driver also supports standard PostgreSQL connection strings (e.g., postgresql://user:pass@host:port/dbname) as the uri option. When using this format, all Redshift-specific parameters (e.g., redshift.cluster_type, redshift.workgroup_name) must be passed as separate connection options. However, using the standard redshift:// URI is recommended.
Feature & Type Support¶
| Feature | Amazon Redshift | |
|---|---|---|
| Bind Parameters | ✅ | |
| Bulk Ingestion | Create | ✅ |
| Append | ✅ | |
| Create/Append | ✅ | |
| Replace | ✅ | |
| Temporary Table | ✅ | |
| Target Catalog | ✅ | |
| Target Schema | ✅ | |
| Non-nullable fields are marked NOT NULL | ✅ | |
| Catalog (GetObjects) | depth=catalogs | ✅ |
| depth=db_schemas | ✅ | |
| depth=tables | ✅ | |
| depth=columns (all) | ✅ | |
| Get Parameter Schema | ✅ | |
| Get Table Schema | ✅ | |
| Prepared Statements | ✅ | |
| Transactions | ✅ | |
Types¶
Database to Arrow¶
| Database Type | Amazon Redshift |
|---|---|
|
BIGINT |
int64 |
|
BOOLEAN |
bool |
|
DATE |
date32[day] |
|
DECIMAL |
decimal128 |
|
DOUBLE PRECISION |
double |
|
GEOGRAPHY |
extension<geoarrow.wkb> |
|
GEOMETRY |
extension<geoarrow.wkb> |
|
HLLSKETCH |
extension<arrow.opaque[storage_type=string, type_name=HLLSKETCH, vendor_name=Amazon Redshift]> |
|
INTEGER |
int32 |
|
INTERVAL DAY TO SECOND |
month_day_nano_interval |
|
INTERVAL YEAR TO MONTH |
month_day_nano_interval |
|
REAL |
float |
|
SMALLINT |
int16 |
|
SUPER |
extension<arrow.json> |
|
TIME |
time64[us] |
|
TIMESTAMP |
timestamp[us] |
|
TIMESTAMP WITH TIME ZONE |
timestamp[us] (with time zone) |
|
TIMETZ |
extension<arrow.opaque[storage_type=string, type_name=TIMETZ, vendor_name=Amazon Redshift]> [1] |
|
VARBYTE |
binary |
|
VARCHAR |
string |
Arrow to Database¶
| Arrow Type | Amazon Redshift Type | |
|---|---|---|
| Bind | Ingest | |
|
binary |
VARBYTE ⚠️ [2] |
VARBYTE |
|
binary_view |
VARBYTE ⚠️ [2] |
❌ [9] |
|
bool |
BOOLEAN |
|
|
date32[day] |
DATE |
|
|
decimal128 |
DECIMAL |
DECIMAL, NUMERIC ⚠️ [10] |
|
double |
DOUBLE PRECISION |
|
|
extension<arrow.json> |
SUPER |
SUPER ⚠️ [11] |
|
extension<geoarrow.wkb> |
(NA/not tested) |
|
|
extension<geoarrow.wkt> |
GEOMETRY |
|
|
fixed_size_binary |
VARBYTE ⚠️ [2] |
❌ [12] |
|
float |
REAL ⚠️ [7] |
REAL |
|
halffloat |
REAL |
(NA/not tested) |
|
int16 |
SMALLINT |
|
|
int32 |
INTEGER |
|
|
int64 |
BIGINT |
|
|
large_binary |
VARBYTE ⚠️ [2] |
VARBYTE |
|
large_string |
VARCHAR |
VARCHAR(MAX) |
|
list |
(NA/not tested) |
SUPER |
|
string |
VARCHAR |
VARCHAR(MAX) |
|
string_view |
VARCHAR |
❌ [13] |
|
struct |
SUPER |
|
|
time32[ms] |
TIME |
❌ [14] |
|
time32[s] |
TIME |
❌ [14] |
|
time64[ns] |
TIME |
❌ [14] |
|
time64[us] |
TIME |
❌ [14] |
|
timestamp[ms] |
TIMESTAMP |
|
|
timestamp[ms] (with time zone) |
TIMESTAMP(3) WITH TIME ZONE |
TIMESTAMPTZ |
|
timestamp[ns] |
TIMESTAMP [8] |
TIMESTAMP |
|
timestamp[ns] (with time zone) |
TIMESTAMP(9) WITH TIME ZONE |
TIMESTAMPTZ |
|
timestamp[s] |
TIMESTAMP |
|
|
timestamp[s] (with time zone) |
TIMESTAMP(0) WITH TIME ZONE |
TIMESTAMPTZ |
|
timestamp[us] |
TIMESTAMP |
|
|
timestamp[us] (with time zone) |
TIMESTAMP(6) WITH TIME ZONE |
TIMESTAMPTZ |
Options¶
Connection Options¶
redshift.application_nameType: string.
The application name to present to the server.
redshift.auth.idc_client_display_nameType: string.
For browser-based authentication, the client name to display in the AWS IAM Identity Center.
redshift.auth.idc_regionType: string.
For browser-based authentication, the AWS region of the IdC.
redshift.auth.idp_response_timeout_secondsType: integer. Default: 120
For IdP token authentication, how long to wait (in seconds) for the SSO flow to complete.
redshift.auth.issuer_urlType: string.
For browser-based authentication, the issuer URL.
redshift.auth.listen_portType: integer. Default: 7890.
For browser-based authentication, the local port to listen on. Use port 0 to have the operating system assign a free port.
redshift.auth.providerValues:
userpass,BrowserIdcAuthPlugin,IdpTokenAuthPlugin. Default:userpass.How to authenticate. The default is user-password;
BrowserIdcAuthPlugintriggers an authentication flow in the browser, whileIdpTokenAuthPluginfetches a token from an IdP.redshift.auth.tokenType: string.
An auth token to use with IdP token authentication.
redshift.auth.token_endpoint.request_dataType: string.
The form-urlencoded request body to POST to the IdP token endpoint.
redshift.auth.token_endpoint.request_headersType: string.
Request headers to send to the IdP token endpoint, encoded as a JSON map.
redshift.auth.token_endpoint.request_urlType: string.
The URL of the IdP token endpoint.
redshift.auth.token_typeValues:
ACCESS_TOKEN,EXT_JWT.The token type to use with IdP token authentication.
redshift.auto_create_userType: boolean. Default: false.
When connecting via IAM, whether to create the user if it does not exist.
redshift.aws.access_key_idType: string.
Explicitly supply the access key ID (by default the AWS SDK configures this, if needed).
redshift.aws.regionType: string.
Explicitly supply the region (by default the AWS SDK configures this).
redshift.aws.secret_access_keyType: string.
Explicitly supply the secret access key (by default the AWS SDK configures this, if needed).
redshift.aws.session_tokenType: string.
Explicitly supply the session token (by default the AWS SDK configures this, if needed).
redshift.aws.profileType: string.
Explicitly supply the profile to use (by default the AWS SDK configures this).
redshift.cluster_identifierType: string.
The cluster to connect to (only applicable if
cluster_typeisredshiftorredshift-iam).redshift.cluster_typeValues:
redshift,redshift-iam, orredshift-serverless.The type of Redshift cluster we are connecting to.
redshiftandredshift-iamboth refer to Redshift clusters, whileredshift-serverlessmeans Redshift Serverless. They defer in how various other connection parameters are validated/inferred; see the connection documentation above.redshift.connect_timeout_msType: integer.
A connection timeout, in milliseconds.
redshift.custom_domain_nameType: string.
Specify the workgroup to use by its custom domain name.
redshift.db_groupsType: string.
A list of groups that the user should join on connection, as a JSON-serialized list of strings.
redshift.db_nameType: string.
The name of the database to connect to.
redshift.ssl_cert,redshift.ssl_key,redshift.ssl_mode,redshift.ssl_root_keyConfigure SSL/TLS options. See the Redshift documentation for details.
redshift.workgroup_nameType: string.
Specify the workgroup to use by its name.
Bulk Ingest Options¶
redshift.ingest.bucketType: string
The S3 bucket to use as a staging area when ingesting data.
redshift.ingest.geo_typeValues:
GEOMETRY,GEOGRAPHY. Default:GEOMETRY.Whether GeoArrow columns (geoarrow.wkb, geoarrow.wkt) are ingested as GEOMETRY (default) or GEOGRAPHY.
redshift.ingest.geoarrow_wkb_sizeType: integer. Default: 1048576
The size of VARBYTE columns created during ingest, used as staging columns for GeoArrow WKB data.
redshift.ingest.varbyte_sizeType: integer. Default: 65536
The size of VARBYTE columns created during ingest.
Caveats¶
Temporary tables are shown in GetObjects, however, the order of the columns of these tables is not guaranteed to be correct. Also, less column/table metadata is returned.
Previous Versions¶
To see documentation for previous versions of this driver, see the following: