Once Connect CDC Director validates a particular column mapping, successful application at the target requires the actual data to resemble its target datatype closely. Connect CDC components format the source data to suit the datatype of the receiving column. The general rules are described below:
A Connect CDC component:
Retrieves most source values as strings. BINARY category values are retrieved in a binary format. LONG BINARY and LONG CHARACTER values are retrieved and temporarily stored in local files on the source host.
Reformats the source values to match the target datatype. BINARY, LONG BINARY, and LONG CHARACTER values cannot be reformatted.
Truncates character category values from the right if the target length is less than the actual data length. Connect CDC issues a warning message when it truncates a value. LONG CHARACTER values are not truncated and receive an error at the target if the value is too long.
-
Truncates digits to the right of the decimal point, if the defined scale at the target is less than that of the data. It truncates the decimal point if the target format is integer (Integral Numeric category).
-
Never truncates significant digits to the left of the decimal point if the target precision is less than the actual data. In this case, Connect CDC attempts to insert such values and lets the target DBMS resolve or reject the insertion.
Truncates certain digits in the Date/Interval category data to accommodate a less precise target datatype. (For example, Connect CDC truncates the time data if the target datatype excludes the time.)
Truncates the time if DATETIME or TIMESTAMP is going to DATE; if DATETIME or TIMESTAMP is going to TIME, Connect CDC truncates the date.
For VARCHAR types, captures and replicates/copies everything including leading and trailing blanks EXACTLY as stored. This includes the VARCHAR types (including IBM i Unicode [CCSID 1200, 1208, and 13488] VARGRAPHIC).
For CHAR types, trims trailing blanks. If the data value is all spaces, 1 space is replicated. The behavior works the same for copy and replication.
Adds a date equal to the current date if time is going to datetime or timestamp.
Adds a time of “00:00:00” if date is going to datetime or timestamp.
Converts a Date category value to null if the value is outside of the range of dates the target DBMS supports.
Connect CDC reports errors generated at the target DBMS in cases where a data insert fails because the value does not fit the datatype definition.