Data Replication Sources and Targets
You can replicate the source data to the following types of targets:
Replicate Data to a Database Target
The first time you run a Data Replication task configured with the full load type or incremental load after initial full load type, the task creates the database tables. The Data Replication task then writes the replicated data to the tables. If the task is configured with the incremental load type for a specific time period, the task performs an upsert to replicate source data from the specified period in time.
During subsequent runs, if the Data Replication task is configured with full load type, the task truncates the database tables and then writes the source data to the tables. If the Data Replication task is configured with an incremental load type, the task performs an upsert operation.
Replicate Data to a Flat File Target
When you run a Data Replication task for a flat file target for the first time, the Data Replication task creates the flat files. The Data Replication task then stores the files in the specified directory and writes the replicated data to the files.
During subsequent runs, the Data Replication task truncates the file and loads the data.
When the Data Replication task includes flat file targets with multibyte data on Linux, the default locale must be UTF-8.
Database Target Reset
Reset a relational target table in a Data Replication task to drop all of the target tables in the task.
You might want to drop a target table to re-create it based on the latest source object definition. When you reset target tables for a Data Replication task, the task completes the following steps:
- 1. Drops all of the target tables included in the Data Replication task from the database.
- 2. Sets the load type for the Data Replication task to full load. You must run a full load to reload the data from all source objects included in the Data Replication task.
When you run the Data Replication task after you reset the target, the Data Replication task recreates each target table. The Data Replication task then loads all of the data into the new table.
If the target table is damaged, the Data Replication task might consistently fail to write to the target table. You might need to reset the relational target.
Rules and Guidelines for Resetting a Target Table
Use the following rules and guidelines when you reset a target table:
- •If you previously created indexes on a target table and reset the target table, the Data Replication task drops the indexes and the target table. You must create the indexes again.
- •An error appears when you try to reset a target table that does not exist in the target database.
- •The Data Replication task drops the target table that was updated the last time the task ran. For example, if you change the prefix of the target table and do not run the Data Replication task, the Data Replication task resets the old target table.
Rules and Guidelines for Data Replication Sources and Targets
Use the following rules and guidelines for sources and targets in a Data Replication task:
- •You cannot simultaneously run multiple Data Replication tasks that write to the same target table.
- •You can use database tables, aliases, and views as sources.
- •If you replicate a source with a name that includes a dollar sign ($), the target name replaces the dollar sign with an underscore (_).