Setting data translations on column mappings
When you add a data translation and start replication, CDC Replication converts data from the source columns into the new data you set for a mapped target column.
Management Console lets you translate specific data in your source columns to new data to mapped target columns. For example, you may have a source column called CITY containing entries like NY, TO, and LON: codes that you want translated to a target column in their full names (New York, Toronto, and London). By specifying data translations, you can convert specific data values during data replication.
You can define data translations for different data types and should only be used when there is a limited number of translations, such as translating product codes to their descriptions.
If you need to convert numerical or date information (where the number of possible data types are limitless), it is best to use an appropriate column function or write a user exit program to convert this kind of information.
Before adding a data translation, consider the following:
- You can add a data translation for columns that contain integer data. However, CDC Replication does not support translations that convert to or from fractional data. For example, CDC Replication supports translations to and from 1 and 100, but does not support translations to and from 1.01 and 100.01.
- You cannot add a data translation for date, time and timestamp data types. Only character and integer numeric data types are supported.
- If you use fractional data to represent whole numbers (for example, 1.0 and 100.0), then CDC Replication translates these whole numbers if you have defined corresponding integer translations (for 1 and 100 respectively).
- You can add a data translation only if the target column is already mapped to a source column.
- You cannot add data-to-data translations for target columns with large object (LOB) data types.
- If you have created a subscription that targets a CDC Replication Engine for Event Server datastore, then you can only add a data translation for source columns that are mapped to target staging columns. You cannot set a data translation for source columns that are mapped to XML elements and attributes.
-
This feature is not available for the CDC Replication Engine for InfoSphere® DataStage® (Cloudant, Flat Files, or Hadoop). For the CDC Replication Engine for Kafka, you can develop a user-defined Kafka custom operation processor to implement this feature.