Using the Change Capture stage

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
ag_ram
Premium Member
Premium Member
Posts: 524
Joined: Wed Feb 28, 2007 3:51 am

Using the Change Capture stage

Post by ag_ram »

Hello Folks

I have a requirement to merge 2 files , with precedence to the first file.
I have used a change capture to do this .
File1 is copied and one is put to output and other link is put to change capture, file2 is directly put to change capture . After ChangeCapture data is merged with file1 data and duplicate is removed . Although looks logically ok , iam not getting expected output !
need your expertise on it ..
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What are you expecting to get? What do you believe is happening that is not documented behaviour? Others find that the stage works as documented.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

To merge the two files you would need to run Change Capture AND Change Apply. Otherwise you would only end up with output from the primary file and nothing from the lookup file. You might be better off with the Merge stage that runs updates from the lookup file against the primary file in one step.
csrazdan
Participant
Posts: 127
Joined: Wed May 12, 2004 6:03 pm
Location: Chicago IL

Post by csrazdan »

Check Link ordering on CDC stage. Ensure you have correct before and after link. This is one common mistake in CDC stage...
Hope it helps......
Assume everything I say or do is positive
ag_ram
Premium Member
Premium Member
Posts: 524
Joined: Wed Feb 28, 2007 3:51 am

Post by ag_ram »

Thanks for your replies

The following was the mistake i had made

The inputs were hash partitioned and sorted , and i was giving the partition to be Auto in the stage

Thanks to you too Vincent , i need data from only one file where keys were same so the "after" link was that , if uniques were present in both they will come out as inserts/deletes from CC stage , so i need not have a change apply in conjunction .

Thanks again , marking this resolved...
Post Reply