What Do Change Capture stage Actions Mean?

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
olgc
Participant
Posts: 145
Joined: Tue Nov 18, 2003 9:00 am

What Do Change Capture stage Actions Mean?

Post by olgc »

I'm surprised that even on its page of Change Capture stage below, It doesn't explain what the actions mean of insert, delete, copy and edit, and doesn't list what the change codes are for these.
https://www-01.ibm.com/support/knowledg ... Stage.html

I only can guess that from the example included in the above URL that the change code for edit is 3, and it is meant that there are existed for both before and after links for the record and contents are different.
It's existed in after but not before for insert action.
Delete action means that found in before link but not after and copy means found in both before and after and also both are identical.

Are the above guessing correct? How great is the document!

Thanks,
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can specify whatever values you like for the values, using options Copy Code, Delete Code, Edit Code and Insert Code. Default values for these are 0, 2, 3 and 1 respectively. As you select each of these properties, the Information pane defines what it means. For example, a copy means that "the before record should be copied to the output without modification".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

It is actually documented. See the bottom half of the HTML doc (link is below). You may have found it easier by reading the PDF doc, or else you have to click further into the HTML version of the same doc, which only gives you one small snippet at a time. That's a huge drawback to HTML docs...

https://www-01.ibm.com/support/knowledg ... stage.html
Choose a job you love, and you will never have to work a day in your life. - Confucius
olgc
Participant
Posts: 145
Joined: Tue Nov 18, 2003 9:00 am

Post by olgc »

Thanks, I actually saw this page. But it doesn't explain what delete means, what edit means. It only specifies the option when delete situation occur do you want to output the record, but what the delete means?
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

I think you've already guessed correctly at the meaning of each change code or action. The key to the interpreting the meaning is documented in the main topic, under the Change Capture stage:

"The Change Capture stage takes two input data sets, denoted before and after, and outputs a single data set whose records represent the changes made to the before data set to obtain the after data set."

So, if a record exists in the "before" data set but not in the "after" data set, it's change code should represent a delete, which by default has a value of 2. Hope that helps.
Choose a job you love, and you will never have to work a day in your life. - Confucius
Post Reply