Table of Contents

Search

  1. Preface
  2. Overview
  3. Datatype Mappings for DB2 for Linux, UNIX, and Windows Sources
  4. Datatype Mappings for Microsoft SQL Server Sources
  5. Datatype Mappings for MySQL Sources
  6. Datatype Mappings for Oracle Sources
  7. Datatype Mappings for Virtual Source Columns

Datatype Mapping Reference

Datatype Mapping Reference

Microsoft SQL Server Source and Amazon Redshift Target

Microsoft SQL Server Source and Amazon Redshift Target

The following table identifies the recommended datatype mappings for Data Replication configurations with a Microsoft SQL Server source and an Amazon Redshift target:
Microsoft SQL Server Source Datatype
Amazon Redshift Target Datatype
Comments
BIGINT
BIGINT
-
BIT
BOOLEAN
-
CHAR(
n
)
VARCHAR(
n'
)
n'
= (
n
+
SrcMinCharsetSize
- 1) /
SrcMinCharsetSize
x
TgtCharsetSize
-
DATE
DATE
-
DATETIME
TIMESTAMP
-
DATETIME2
TIMESTAMP
-
DATETIMEOFFSET
TIMESTAMP
-
DECIMAL(
p
,
s
)
  • NUMERIC(
    p
    ,
    s
    )
    Mapping condition:
    (
    p
    <= 38) and (
    s
    <=
    p
    ) and (0 <=
    s
    ) and (1 <=
    p
    )
  • NUMERIC(
    p
    ,
    s'
    )
    s'
    = 0
    Mapping condition:
    (
    p
    <= 38) and (
    s
    == -1) and (1 <=
    p
    )
  • NUMERIC(18,0)
    Mapping condition:
    (
    p
    == -1) and (
    s
    == -1)
-
FLOAT
FLOAT
-
INT
INTEGER
-
MONEY
DECIMAL(19,4)
-
NCHAR(
n
)
VARCHAR(
n'
)
n'
= (
n
+
SrcMinCharsetSize
- 1) /
SrcMinCharsetSize
x
TgtCharsetSize
-
NTEXT
VARCHAR(65000)
-
NUMERIC(
p
,
s
)
  • NUMERIC(
    p
    ,
    s
    )
    Mapping condition:
    (
    p
    <= 38) and (
    s
    <=
    p
    ) and (0 <=
    s
    ) and (1 <=
    p
    )
  • NUMERIC(
    p
    ,
    s'
    )
    s'
    = 0
    Mapping condition:
    (
    p
    <= 38) and (
    s
    == -1) and (1 <=
    p
    )
  • NUMERIC(18,0)
    Mapping condition:
    (
    p
    == -1) and (
    s
    == -1)
-
NVARCHAR(
n
)
  • VARCHAR(
    n'
    )
    n'
    = (
    n
    +
    SrcMinCharsetSize
    - 1) /
    SrcMinCharsetSize
    x
    TgtCharsetSize
    Mapping condition:
    n
    != -1
  • VARCHAR(65000)
    Mapping condition:
    n
    == -1
-
REAL
REAL
-
SMALLDATETIME
TIMESTAMP
-
SMALLINT
SMALLINT
-
SMALLMONEY
DECIMAL(10,4)
-
SQL_VARIANT
VARCHAR(65000)
-
SYSNAME(
n
)
  • VARCHAR(
    n
    )
    Mapping condition:
    n
    != -1
  • VARCHAR(65000)
    Mapping condition:
    n
    == -1
-
TEXT
VARCHAR(65000)
-
TIME
TIMESTAMP
When replicating a TIME value to a TIMESTAMP column, Data Replication sets the date part of the target TIMESTAMP value to 1 Jan 1900.
TIMESTAMP
BIGINT
-
TINYINT
NUMERIC(3,0)
-
VARCHAR(
n
)
  • VARCHAR(
    n'
    )
    n'
    = (
    n
    +
    SrcMinCharsetSize
    - 1) /
    SrcMinCharsetSize
    x
    TgtCharsetSize
    Mapping condition:
    n
    != -1
  • VARCHAR(65000)
    Mapping condition:
    n
    == -1
-
XML
VARCHAR(65000)
-

0 COMMENTS

We’d like to hear from you!