Database Ingestion and Replication > Default data-type mappings > Microsoft SQL Server or Azure SQL Database Source and Amazon Redshift Target
  

Microsoft SQL Server or Azure SQL Database Source and Amazon Redshift Target

The following table identifies the recommended data-type mappings for Database Ingestion and Replication configurations with a Microsoft SQL Server or Azure SQL Database source and an Amazon Redshift target:
Microsoft SQL Server or Azure SQL Database Source Data Type
Amazon Redshift Target Data Type
bigint
bigint
binary(size), 1 <= size <= 8000
binary varying(size), 1 <= size <= 8000
bit
boolean
char(size), 1 <= size <= 8000
character varying(size), 1 <= size <= 8000
date
date
datetime
timestamp without time zone
datetime2(7)
character varying(27)
datetime2(precision), 0 <= p <= 6
timestamp without time zone
datetimeoffset(7)
character varying(67)
datetimeoffset(precision), 0 <= p <= 6
timestamp with time zone
decimal(38,38)
character varying(41)
decimal(p,s), 1 <= p <= 38, 0 <= s <= 37
numeric(p,s), 1 <= p <= 38, 0 <= s <= 37
float
double precision
geography
binary varying(1024000)
geometry
binary varying(1024000)
hierarchyid
binary varying(892)
image
binary varying(1024000)
int
integer
money
numeric(20,4)
nchar(size), 1 <= size <= 4000
character varying(size), 1 <= size <= 8000
ntext
character varying(65535)
numeric(38,38)
character varying(41)
numeric(p,s), 1 <= p <= 38, 0 <= s <= 37
numeric(p,s), 1 <= p <= 38, 0 <= s <= 37
nvarchar(size), 1 <= size <= 4000
character varying(size), 1 <= size <= 8000
real
real
smalldatetime
timestamp without time zone
smallint
smallint
smallmoney
numeric(10,4)
sql_variant
binary varying(8016)
text
character varying(65535)
time(precision), 0 <= p <= 7
varchar(16)
timestamp(8)
binary varying(8)
tinyint
smallint
uniqueidentifier
character(36)
varbinary(size), 1 <= size <= 8000
binary varying(size), 1 <= size <= 8000
varchar(size), 1 <= size <= 8000
character varying(size), 1 <= size <= 8000
xml
character varying(65535)
LOB limitations
Database ingestion and replication initial load jobs can replicate data from SQL Server GEOGRAPHY, GEOMETRY, IMAGE, NTEXT, NVARCHAR(MAX), TEXT, VARBINARY(MAX), VARCHAR(MAX), and XML columns to Amazon Redshift targets. LOB data might be truncated before being written to the target. The truncation point depends on the data type and target type. For initial load jobs with an Amazon Redshift target, GEOGRAPHY, GEOMETRY, IMAGE and VARBINARY(MAX) data is truncated to 1024000 bytes, and NTEXT, NVARCHAR(MAX), TEXT, VARCHAR(MAX), and XML data is truncated to 65535 bytes. For more information, see the "Include LOBs" description in Configure a Microsoft SQL Server source.
Unsupported source data types
None.