Creating and Syncing the Change Data Capture Transformation

A Change Data Capture Transform is a type of transformation that tracks the changes made in the source table but does not move any data.  This type of transformation is designed to be used with Microsoft SQL Server Integration Services ( SSIS).

For information on how to use the data from a Change Data Capture Transformation see the section Using change data capture data.

 

To create a change data capture transform, Click Add Transform from the Transformations Tab to enter the stepper.  Select the source as before.  On the Target step, check the Create a change data capture... radio button and press Next to proceed through the stepper.  The column mapping step will be skipped because there is no target table, the transform is just tracking the changes on the source table.  On the index tab, select or specify a unique index if there is one and press Save.

 

TransformationCDC.bmp

 

After pressing save you are returned to the Transformations tab.  Select the change data capture transform that was just created and press the Sync button.  The Synchronize window will appear.  The first time a change data capture transformation is synchronized it must create a baseline that future changes will be compared to.  To do this select the CRC Baseline option, if there is no baseline and CRC Savepoint is checked the baseline will still be created.  Press OK, the transform will be synced.

 

 SyncTypeCRCBaseline.bmp

 

Looking at the statistics for the baseline sync, 1107 rows were synced. Since this is a baseline, there were no Inserts updates or deletes.  

 

CDCBaselineResults.bmp

 

InfoNaut was used to add, update and delete some rows in the source table.  To see those changes, click the Sync button with the same cdc transform selected.

 

This time in the Synchronize window, select CRC Savepoint and then click OK.  DataSync will now get the changes from the last time a baseline was run.

 

 SyncTypeCRCSavepoint.bmp

 

Looking at the statistics on the transform, we can see that since the baseline was run, 1 row was inserted, 2 were updated and 1 deleted.  Now we have the change data that can be used in SQL Server Integration Services.

 

CDCSavePointResults.bmp