Home > Software > Data-Warehouse > DataStage
Interview Questions   Tutorials   Discussions   Programs   Discussion   

DataStage - What is main difference between change capture and change apply stages?




2547
views
asked mar September 20, 2014 06:33 AM  

What is main difference between change capture and change apply stages?


           

1 Answers



 
answered By vishnoiprem   0  
Change Capture Stage is used to capture the changes between two sources based on the change code.

Change Code is the Code generated when we capture the changes using Change Capture Stage. They are four change codes available

0,1,2,3,4

0-------Copy
1-------Insert
2-------Delete
3-------Edit

Take Job Design as
CDC -- Change Capture

Sample Source Data You can take like below

Before_Data
e_id,e_name,e_Add
11,kim,bris
22,jim,mel
33,pim,syd
44,lim,canb
55,pom,pth






After_Data
e_id,e_name,e_add
11,kim,syd
22,jim,canb
33,pim,syd
44,lim,canb
55,pom,pth


Read the data in two different files. And

Go to Change Capture Stage

Select Key_id as e_id

and click on change values.

Select Values in Available Properties to add

And select e_add as value

Click Ok

Go to Output --- Drag and Drop All the required columns required.

You can drag and drop every thing here. And Click Ok


Give file name in the Target File

Compile and Run the Job

You will get the output as



e_id e_name e_add change_code

11 kim syd 3
22 jim canb 3


3 means edited data
flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert