If you enable the replication of CREATE TABLE or ADD COLUMN operations, when the Extractor captures these DDL changes, Data Replication adds the new table or column to the mapping in the configuration. Thereafter, Data Replication can replicate Insert, Update, and Delete operations for the added table or column.
To create a table or a column, Data Replication uses the datatype conversion rules that are defined in the <ConversionRules> section of the
DataReplication_installation
\uiconf\DataTypes.xml file.
For CREATE TABLE operations, Data Replication creates the target table and maps it to the source table. The following considerations apply to CREATE TABLE processing:
Data Replication processing of CREATE TABLE operations depends on the target type in the following manner:
For Amazon Redshift, Greenplum, Netezza, Teradata
, and Vertica
targets, Data Replication creates the target table and a corresponding audit log table and then maps the source table to the target table for Merge Apply processing.
For
DB2,
MemSQL, Microsoft SQL Server
, MySQL,
PostgreSQL,
and Oracle targets, Data Replication creates a target table and then maps the source table to the target table for SQL Apply processing.
For Cloudera, Flat File, and Hortonworks targets, Data Replication creates flat files that correspond to the newly created source table after one or more records are inserted into the new table.
If you replicate CREATE TABLE operations from Microsoft SQL Server sources, manually enable Change Data Capture for the source tables. Otherwise, Data Replication cannot replicate change data to the target tables that the CREATE TABLE operations created.
Data Replication processing of ADD COLUMN operations depends on the apply mode in the following manner:
In Audit Apply mode, Data Replication creates the columns for before and after values, which correspond to the added column, in the audit log table, if the table exists.
In Merge Apply mode, Data Replication creates the target column and also creates the corresponding audit log table columns for before and after values in the target database.
In SQL Apply mode, Data Replication creates the target column.