Skip to main content

Amazon Redshift Reference

Authentication options and data type handling for Redshift connections.

Authentication

Connection parameterEnvironment variable
userDATACONTRACT_REDSHIFT_USERNAME
passwordDATACONTRACT_REDSHIFT_PASSWORD

host, port (default 5439), database, and schema come from the contract's servers block.

note

IAM-based authentication (region / access key / role ARN) is not currently supported for Redshift, because ibis connects through the generic Postgres backend rather than a Redshift-specific driver.

Data types

Importing

datacontract import sql --dialect redshift maps DDL types like the Postgres dialect: VARCHAR/CHAR/TEXTstring, integer types → integer, NUMERIC/DECIMAL/REAL/DOUBLE PRECISIONnumber, BOOLEANboolean, DATEdate, TIMEtime, TIMESTAMP/TIMESTAMP WITH TIME ZONEtimestamp. Redshift-specific types without a portable equivalent (SUPER, GEOMETRY) get no logicalType; the physicalType is still written.

Testing

Redshift supports native type introspection: the declared physicalType is checked against information_schema.columns. decimal and numeric are interchangeable, as are timezone variants of timestamps; length/precision is only enforced when declared. A physicalType that can't be interpreted falls back to the logical type category comparison.

Logical type mapping

When no physicalType is declared, the CLI derives the native type from the logicalType — for example in datacontract export sql and the dbt exports. This table is generated from the converter in the CLI's code:

logicalTypeRedshift type
stringtext
integerinteger
numbernumeric
booleanboolean
datedate
timestamptimestamptz
timetime
objectjsonb
arraytext[]