Data Synchronization

The "Data Synchronization" option is used for synchronizing data from the Source to Target. All changes made on the Source are applied to the Target.

To perform "Data Synchronization" using the appRules Data Migration Engine, drag-and-drop the MigrateData workflow activity from the toolbox on to the designer and configure as follows:

  1. Enter a display name and description for the workflow activity or accept the defaults.

  2. Select "Data Synchronization" as the Data Migration Type.

  3. Select the Default Source. If the Source data source does not exist, you can use the New Data Source button to add it.

  4. Select the Default Target from the list. If the Target data source does not exist, you can use the New Data Source button to add it.

Click the OK button on the "Initialize Data Migration Activity" modal to accept the entries and continue.

The Target Entities selection modal will be displayed:

Select the Target entities into which Source data records will be synchronized.

Click OK and the "Target Entities Detail" modal will be displayed:

Complete the synchronization properties to be used for initializing the "Target Entities Collection" as follows:

PropertyDescription

Target Entity Name

Enter the name of the Target entity/table into which data records from the Source will be synchronized. This property is auto-generated.

Synch Source Entity

Enter the name of the Source entity/table whose data records are to be synchronized into the Target. This property is auto-generated.

Source CreatedOn Date

The column name of datetime the record was created if supported by the source.

Source ModifiedOn Date

The column name of datetime the record was modified if supported by the source.

Auto-Map

Whether to auto-map the source data fields to the target data fields.

Synchronize Deletions

Whether to include a target entity entry to synchronize deleted records. Check to make sure that the data source supports a flag in a table for deleted records.

Inserts & Updates

Configure the query to be used for reading records that have been recently inserted or updated on the source. Note: Follow instructions to define the query to be used for loading data records to be synchronized.

Deletions

If "Synchronize Deletions" has been checked, configure the query to be used for reading records that have been recently deleted on the source. Note: Follow instructions to define query to be used for loading data records to be synchronized.

Creating Data Synchronization Queries

The queries to be used to load records to be synchronized with the Target must be defined using "System Sourced Values" maintained by appRules:

System Sourced ValueDescription

WorkflowCurrentStartDateTime

The start date/time of the currently executing instance

WorkflowLastStartDateTime

The start time of the last run of the project

Inserts & Updates Query

To create the query for synchronizing inserts and updates for a specific entity, click the "Inserts & Updates" column on the specific row.

Select the fields or columns to be synchronized:

Configure the query to be used for synchronizing the selected columns using the Query Editor:

Note that the WorkflowLastStartDateTime and WorkflowCurrentStartDateTime have been inserted into the query.

You can modify the query to suit your needs using the toolbar buttons of the Query Editor. Use the Insert button to insert values to be generated at runtime.

Deletions Query

To create the query for synchronizing deletions for a specific entity, click the "Deletions" column on the specific row.

Select the primary key column:

Configure the query to be used for locating the deleted records using the Query Editor:

Note that the WorkflowLastStartDateTime and WorkflowCurrentStartDateTime have been inserted into the query.

You can modify the query to suit your needs using the toolbar buttons of the Query Editor. Use the Insert button to insert values to be generated at runtime.

Target Entities Collection

Once you complete the entries for data synchronization, click the OK button to display the Target Entities Collection:

Refer to the Target Entities Collection section for notes on configuring the target entities including the table creation properties.

Configure all required properties of the Target Entities Collection.

Run your data synchronization project after configuring, reviewing, and saving the Target Entities Collection.

Last updated