Supported table mappings
The following list indicates some examples:
- mapping a VARCHAR to a VARCHAR where the maximum length is smaller on the target column
- mapping an INTEGER to a SMALLINT
- mapping a VARCHAR in a UTF8 encoding to a VARCHAR in an Shift-JIS encoding
When possible you should map to a target column that can contain all the values that will occur in the source column but if CDC Replication does encounter values during replication that can't fit into the target column this will not be considered an error and replication will continue.
If you have business requirements for a specific transformation for data values that can't fit then you will need to use an expression to implement that transformation. CDC Replication will ensure that it generates a data value that can fit in the target column. In some cases that value may be based upon the value of the source column but performance considerations will affect the generated value so that you cannot rely on any specific relationship between the source column and the generated value.
The following sections indicate the table mappings that you can create in Management Console with supported data types.
Db2 LUW
Source data types | Supported table mappings |
---|---|
BIGINT | Any numeric data type |
BINARY |
Any binary or BLOB data type |
BLOB | Any binary or BLOB data type |
BOOLEAN |
Any Boolean data type |
CHAR | Any character, variable character, or CLOB data type |
CHARACTER FOR BIT DATA | Any binary or BLOB data type |
CLOB | Any character, variable character, or CLOB data type |
DATE | Any date data type |
DBCLOB | Any character, variable, CLOB, or DBCLOB data type. |
DECIMAL | Any numeric data type |
DECFLOAT | Any numeric data type |
DOUBLE PRECISION | Any numeric data type |
FLOAT | Any numeric data type |
GRAPHIC | Any character, variable character, or CLOB data type |
INTEGER | Any numeric data type |
LONG VARCHAR | Any character, variable character, or CLOB data type |
LONG VARCHAR FOR BIT DATA | Any binary or BLOB data type |
LONG VARGRAPHIC | Any character, variable character, or CLOB data type |
NUMERIC | Any numeric data type |
REAL | Any numeric data type |
SMALLINT | Any numeric data type |
TIME | Any time data type |
TIMESTAMP | Any date, time, or timestamp data type |
VARBINARY |
Any binary or BLOB data type |
VARCHAR | Any character, variable character, or CLOB data type |
VARCHAR FOR BIT DATA | Any binary or BLOB data type |
VARGRAPHIC | Any character, variable character, or CLOB data type |
XML | XML, CLOB, or any character type |
Db2 for z/OS
For the purposes of supported table mappings, the following text offers a definition of binary and text fields:
- A text field is any CHAR, VARCHAR, GRAPHIC, VARGRAPHIC, BINARY, VARBINARY, BLOB, CLOB or DBCLOB column which has a CCSID (code page) or an XML column. By default, columns will have a CCSID or not, based on their definition in DB2®. This CCSID, or lack of it, can be overridden using the Encoding tab in the Mapping Details view. Any text field can be mapped to any other text field.
- A binary field is any CHAR, VARCHAR, GRAPHIC, VARGRAPHIC, BINARY, VARBINARY, BLOB, CLOB or DBCLOB column which does not have a CCSID (code page). By default, columns will have a CCSID or not, based on their definition in DB2. This CCSID, or lack of it, can be overridden using the Encoding tab in the Mapping Details view. Any binary field can be mapped to any other binary field.
Source data types | Supported table mappings when a code page is assigned | Supported table mappings when a code page is not assigned | Supported table mappings when a code page is not applicable |
---|---|---|---|
BIGINT | N/A | N/A | Any numeric data type |
BINARY | Any text field | Any binary field | N/A |
BLOB | Any text field | Any binary field | N/A |
CHAR (for BIT) | Any text field | Any binary field | N/A |
CHAR (for MIXED) | Any text field | Any binary field | N/A |
CHAR (for SBCS) | Any text field | Any binary field | N/A |
CLOB | Any text field | Any binary field | N/A |
DATE | N/A | N/A | Any date data type |
DBCLOB | Any text field | Any binary field | |
DECIMAL | N/A | N/A | Any numeric data type |
DECFLOAT | N/A | N/A | Any numeric data type |
DOUBLE | N/A | N/A | N/A |
FLOAT | N/A | N/A | Any numeric data type |
GRAPHIC | Any text field | Any binary field | |
INTEGER | N/A | N/A | Any numeric data type |
LONG VARCHAR | |||
LONG VARGRAPHIC | |||
REAL | |||
ROWID | N/A | N/A | For DB2 for z/OS® to DB2 to z/OS mappings, a source ROWID column can only be mapped to a target ROWID column. Column mappings to any other target database permit mappings to binary data types. |
SMALLINT | N/A | N/A | Any numeric data type |
TIME | N/A | N/A | Any time data type |
TIMESTAMP | N/A | N/A | Any date, time, or timestamp data type (any timestamp data type without time zone) |
TIMESTAMP WITH TIME ZONE | N/A | N/A | Any date, time, timestamp or TIMESTAMP WITH TIME ZONE type |
VARBINARY | Any text field | Any binary field | N/A |
VARCHAR (for BIT) | Any text field | Any binary field | N/A |
VARCHAR (for MIXED) | Any text field | Any binary field | N/A |
VARCHAR (for SBCS) | Any text field | Any binary field | N/A |
VARGRAPHIC | Any text field | Any binary field | N/A |
XML | N/A | N/A | Any text field where the source field contains a valid XML document |
Microsoft SQL Server
Source data types | Supported table mappings |
---|---|
BIGINT | Any numeric data type |
BINARY | Any binary or BLOB data type |
BIT | Any numeric data type |
CHAR | Any character, variable character, or CLOB data type. |
DATE | Any datetime, date, or time data type |
DATETIME | Any datetime, date, or time data type |
DATETIME2 | Any datetime, date, or time data type |
DATETIMEOFFSET | Any datetime, date, or time data type |
DECIMAL | Any numeric data type |
FLOAT | Any numeric data type |
GEOGRAPHY |
Geography, binary, or any BLOB data type. |
GEOMETRY |
Geometry, binary, or any BLOB data type. |
IMAGE | Any BLOB data type. |
INTEGER | Any numeric data type |
MONEY | Any numeric data type |
NCHAR | Any character, variable character, or CLOB data type. |
NTEXT | Any character, variable character, or CLOB data type |
NUMERIC | Any numeric data type |
NVARCHAR | Any character, variable character, or CLOB data type. |
NVARCHAR(MAX) | Any character, variable character, or CLOB data type. |
REAL | Any numeric data type |
ROWVERSION | Any binary or BLOB data type |
SMALLDATETIME | Any datetime, date, or time data type |
SMALLINT | Any numeric data type |
SMALLMONEY | Any numeric data type |
SQL_VARIANT | sql_variant |
TEXT | Any character, variable character, or CLOB data type. |
TIME | Any datetime, date, or time data type |
TINYINT | Any numeric data type |
UNIQUEIDENTIFIER | Any binary, BLOB, or UNIQUEIDENTIFIER data type |
VARBINARY | Any binary or BLOB data type |
VARBINARY(MAX) | Any binary or BLOB data type |
VARCHAR(MAX) | Any character, variable character, or CLOB data type. |
XML | XML, CLOB, or any character type |
Oracle
Source data types | Supported table mappings |
---|---|
BIGINT | Any numeric data type |
BOOLEAN | Any Boolean data type |
BOOL | Any Boolean data type |
BLOB | Any LOB, interval DTS, interval YTM, LONG RAW, or RAW data type |
BYTEINT | Any numeric data type |
CHAR | Any character, variable character, LOB, interval DTS, interval YTM, LONG VARCHAR, NCHAR, NVARCHAR, or XML type data type |
CHARACTER | |
CHARACTER VARYING | |
CLOB | Any character, variable character, interval DTS, interval YTM, LONG VARCHAR, NCHAR, NVARCHAR, or XML type data type |
DATE | Any date or timestamp data type |
DECIMAL | Any numeric data type |
DOUBLE PRECISION | |
FLOAT | Any numeric data type |
FLOAT(p) | |
INTEGER | Any numeric data type |
INTERVAL DAY TO SECOND | Any character, variable character, LOB, interval DTS, interval YTM, LONG RAW, LONG VARCHAR, NCHAR, NVARCHAR, RAW, or XML type data type |
INTERVAL DAY TO MONTH | Any character, variable character, LOB, interval DTS, interval YTM, LONG RAW, LONG VARCHAR, NCHAR, NVARCHAR, RAW, or XML type data type |
LOB | |
LONG RAW | Any LOB, interval DTS, interval YTM, LONG RAW, or RAW data type |
LONG VARCHAR | Any character, variable character, interval DTS, interval YTM, LONG VARCHAR, NCHAR, NVARCHAR, or XML type data type |
NCHAR | Any character, variable character, interval DTS, interval YTM, LONG VARCHAR, NCHAR, NVARCHAR, or XML type data type |
NCLOB | Any character, variable character, interval DTS, interval YTM, LONG VARCHAR, NCHAR, NVARCHAR, or XML type data type |
NUMERIC | Any numeric data type |
NUMERIC(p) | |
NUMERIC(p, s) | |
NVARCHAR | Any character, variable character, interval DTS, interval YTM, LONG VARCHAR, NCHAR, NVARCHAR, or XML type data type |
NVARCHAR2 | Any character, variable character, LOB, interval DTS, interval YTM, LONG RAW, LONG VARCHAR, NCHAR, NVARCHAR, RAW, or XML type data type |
RAW | Any character, variable character, LOB, interval DTS, interval YTM, LONG RAW, LONG VARCHAR, NCHAR, NVARCHAR, RAW, or XML type data type |
REAL | Any numeric data type |
ROWID | |
SMALLINT | Any numeric data type |
TIME | Any time data type |
TIMESTAMP | Any date or timestamp data type |
TIMESTAMP WITH TIME ZONE | Any date or timestamp data type |
TIMEZONE | Any date or timestamp data type |
VARCHAR | Any character, variable character, interval DTS, interval YTM, LONG VARCHAR, NCHAR, NVARCHAR, or XML type data type |
VARCHAR2 | Any character, variable character, interval DTS, interval YTM, LONG VARCHAR, NCHAR, NVARCHAR, or XML type data type |
XMLTYPE | Any character, variable character, LOB, interval DTS, interval YTM, LONG RAW, LONG VARCHAR, NCHAR, NVARCHAR, RAW, or XML type data type |