Change Capture Stage in Datastage

Change Capture Stage in Datastage

The change Capture stage in DataStage allows to Capture the Change in two source datasets(before and after) and mark the difference in one of the output column. The comparison is made by key columns specified in properties. The changes are recorded as insert, copy, edit and delete. The incoming data is assumed pre-sorted in ascending order and key partitioned.

Example :

Let us assume following are incoming datasets

before dataset:

EMPID SALARAY DEPT
1 1000 IT
2 200 HR
3 300 IT
4 400 CA
5 500 HR

After Dataset:

EMPID SALARAY DEPT
1 200 IT
2 200 HR
3 300 IT
4 400 CA
5 5000 HR

 

Target Dataset:

EMPID SALARAY DEPT Change_code
1 200 IT Edit
2 200 HR Copy
3 300 IT Copy
5 5000 HR Edit
4 400 CA copy

Here for employee id with 1 and 5 salaries is changed.

Change_code Column

The Change_code Column is automatically generated and must be mapped in the output tab of Change capture stage.

 

Change capture stage properties
Change capture stage properties

Share this post

Leave a Reply