Skip to main content
Feedback

Amazon Redshift mapping columns

Type mapping

The platform matches Redshift data types to Data Integration data types while extracting your data.

The following table shows the mapping of Redshift data types to Data Integration-compatible types:

Data Integration TypeAmazon Redshift Type
TIMESTAMPINTERVAL
FLOATDOUBLE_PRECISION
FLOATFLOAT
STRINGCHAR
DATEDATE
STRINGVARCHAR
TIMESTAMPTIMESTAMP
STRINGENUM
BOOLEANBOOLEAN
STRINGARRAY
STRINGarray
STRINGBYTEA
BOOLEANBIT
FLOATREAL
INTEGERBIGINT
STRINGTEXT
INTEGERSMALLINT
FLOATNUMERIC
INTEGERINTEGER
STRINGCIDR
STRINGDropEnumType
STRINGINET
STRINGMACDDR
STRINGOID
STRINGTSVECTOR
STRINGUUID
INTEGERDATERANGE
INTEGERINT4RANGE
INTEGERINT8RANGE
STRINGJSON
STRINGJSONB
FLOATNUMRANGE
FLOATTSRANGE
STRINGHSTORE
JSONSUPER
note

To use SUPER data types, change the mapping from Object to JSON, which generates the SUPER datatype.

Scenarios of data type conflicts

When a datatype mismatch occurs, such as when the existing source table column’s datatype changes, the platform determines the corresponding column’s datatype in the target table using predefined rules. These rules select the most comprehensive datatype to preserve data integrity and prevent information loss.

Examples of data type conflicts

The table below outlines scenarios of data type conflicts and the resolution rules. The Inferred Type column represents the chosen data type in the target table when there is a conflict.

Conflicting TypesInferred TypeExample Scenario
TIMESTAMP vs. DATETIMESTAMPIf a source column initially of TIMESTAMP type, changed to DATE, the platform converts it to TIMESTAMP in the target.
SMALLINT vs. BOOLEANSMALLINTA conflict between SMALLINT and BOOLEAN types in the source column will lead to the target column adopting the SMALLINT type.
INTEGER vs. (SMALLINT / BOOLEAN)INTEGERIf initially an INTEGER, and changed to SMALLINT or BOOLEAN in the source, then the platform promotes it to INTEGER in the target.
BIGINT vs. (INTEGER / SMALLINT / BOOLEAN)BIGINTIf a column of BIGINT type, changed to SMALLINT, BOOLEAN, or INTEGER in the source,elevates to BIGINT in the target.
DECIMAL vs. (INTEGER / BIGINT / SMALLINT / BOOLEAN)DECIMALTransforms a column that is INTEGER or DECIMAL in the source into DECIMAL.
DOUBLE PRECISION vs. (INTEGER / BIGINT / SMALLINT / BOOLEAN)DOUBLE PRECISIONIf there is a conflict between DOUBLE PRECISION and SMALLINT in the source column, the target column will adopt DOUBLE PRECISION.
REAL vs. (DOUBLE PRECISION / DECIMAL / INTEGER / BIGINT / SMALLINT / BOOLEAN)REALIf a column of DOUBLE PRECISION type, and changed to REAL type in the source, it remains as REAL in the target.
FLOAT vs. (INTEGER / BIGINT / SMALLINT / DECIMAL / REAL / DOUBLE PRECISION / BOOLEAN)FLOATA source column initially of FLOAT type, and updated to INTEGER remains as FLOAT in the target.
VARCHAR vs. ALL DATATYPESVARCHARIf a column in the source is VARCHAR type and updated to INTEGER type, the target column retains the VARCHAR type.
OBJECT vs. ALL DATATYPESOBJECTIf a source column is initially set as OBJECT type and later changed to DATE or INTEGER, the target treats as OBJECT type.
note

VARCHAR and OBJECT have higher priority and overrides other data types in conflicts.

On this Page