Change Capture Stage Behaviour

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
r.vikram87datastage
Participant
Posts: 18
Joined: Sat Sep 24, 2011 10:41 am

Change Capture Stage Behaviour

Post by r.vikram87datastage »

Hi Guys,

I am new to Datastage. I am doing some POC's on change capture stage.
I had tried the following example using Change capture stage.

Before Dataset,
Code Name
P1 A
P2 B


After Dataset
Code Name
P1 C
P2 B
P1 D

key column is Code and change value is Name.

ResultSet

Code Name ChangeCode
P1 C 3 (Modify)
P2 B 0 (Copy)
P1 D 1 (Insert)

For the third record , i was expecting code 3 (i.e) Modify but got 1 (new record) .

So the key column should not have more than one record for the same value ( in my example P1 ) in the after dataset if we are using change capture stage ???

Kindly help me out guys....


Thanks in advance,

Vikram.
Vikram
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Re: Change Capture Stage Behaviour

Post by SURA »

check the linking order.

DS User
suse_dk
Participant
Posts: 93
Joined: Thu Aug 11, 2011 6:18 am
Location: Denmark

Post by suse_dk »

The CDC stage cannot handle duplicate keys. You'll need to remove duplicates before processing datasets.
_________________
- Susanne
deeplind07
Participant
Posts: 31
Joined: Mon Jun 28, 2010 5:15 am
Location: pune

Re: Change Capture Stage Behaviour

Post by deeplind07 »

You need to sort your input as change capture stage assumes that the input is sorted
r.vikram87datastage
Participant
Posts: 18
Joined: Sat Sep 24, 2011 10:41 am

Post by r.vikram87datastage »

Hello Guys ,
Thanks for your kind reply.

Change capture stage doesnt support duplicate keys even if the input data is sorted.

Thanks again,

Vikram.
Vikram
Post Reply