Page 1 of 1

Change Capture stage with duplicate after link

Posted: Wed Jan 13, 2016 12:30 pm
by jiangyf@cn.ibm.com
before link
KEY1,KEY2,Data1,Data2

After Link
KEY1,KEY2,Data1,Data2
KEY1,KEY2,Data3,Data4

as you can see there is duplicate key value in after link

I set up on job with Change capture with reject copy option.

but i got KEY1,KEY2,Data3,Data4 as new record and should be insert

and duplicate error when insert

do you know why?

Posted: Wed Jan 13, 2016 1:17 pm
by qt_ky
From the guide: "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."

I think the first pair of records, the copy, did get rejected, and that action consumed them, then the stage moved on to compare the next record(s) available.

Double check to make sure that your before and after link ordering is correct or if it needs to be swapped.

Posted: Thu Jan 14, 2016 8:29 am
by Mike
Change capture stage needs unique keys on both inputs. As noted by qt_ky, it is a simple 2-file match process on ordered inputs... once a record is consumed on an input it is no longer available for the next key comparison.

Mike

Posted: Thu Jan 14, 2016 9:09 am
by jiangyf@cn.ibm.com
I see Thank you Mike