CDC Stage without key only value changes

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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Are you sure that you haven't switched around your primary and secondary input links? Assume they are switched, would that explain your output behaviour?
mandyli
Premium Member
Premium Member
Posts: 898
Joined: Wed May 26, 2004 10:45 pm
Location: Chicago

Post by mandyli »

even I changed still not working.
Kryt0n
Participant
Posts: 584
Joined: Wed Jun 22, 2005 7:28 pm

Re: CDC Stage without key only value changes

Post by Kryt0n »

So you had already gone back to the beginning...
mandyli wrote:1) I need to find out if there is no match records found between sources and target using 'Name '& 'sub_name' column then I have to insert with Flag 'Y'
By the fact you are checking if "name" and "sub_name" exist in the target table, it makes these the key
mandyli wrote:2) There is some rows in Target but not in Source then I have to update the Flag 'N'
So you want your full target data as your "before" set and your source data as "after" in CDC, use both "name" and "sub_name" as your key. Keep both inserts and deletes meaning if the row is in your "before" and not in your "after" you send through a delete record (code 2) and if it exists in your "after" and not "before" you send through an insert record (code 1)

If you are altering a flag to 'N', you would really also need the "copy" set and update to 'Y' otherwise these will remain 'N' (if currently so). Alternatively, add the update flag as 'Y' in your "after" set and use that as your comparison column, this way any record that exists in the "before" with flag set to Y and still exists in your "after" will be dropped from processing but if it is 'N' in your before and exists in your after, you update to Y (you would need to keep the "edit" rather than "copy" in this case)
mandyli
Premium Member
Premium Member
Posts: 898
Joined: Wed May 26, 2004 10:45 pm
Location: Chicago

Post by mandyli »

Thanks Lot.

If I make Name and Sub_name as key what about change values?

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

Post by ray.wurlod »

You can always create alias columns, for example in a Transformer stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply