If you enable replication of TRUNCATE TABLE operations, Data Replication can process TRUNCATE TABLE operations for most source types. How Data Replication processes source TRUNCATE TABLE operations on the target depends on the apply mode and the target database type.
The apply mode affects TRUNCATE TABLE apply processing in the following manner:
In SQL Apply and Audit Apply modes, Data Replication truncates the mapped target table or audit log table.
Do not enable replication of TRUNCATE TABLE operations in Audit Apply mode if you want to preserve the change data in the audit log tables.
In Merge Apply mode, Data Replication truncates the mapped target table but does not truncate the corresponding audit log table.
Additionally, some target types have special apply considerations:
For MemSQL
, MySQL,
and Netezza targets, Data Replication replicates TRUNCATE TABLE operations as DELETE FROM operations.
For Teradata targets, Data Replication replicates TRUNCATE TABLE operations as DELETE ALL operations.
For
Apache Kafka,
Cloudera, Flat File, and Hortonworks targets, Data Replication does not support TRUNCATE TABLE operations. Do not enable replication of TRUNCATE TABLE operations for these targets.