change capture

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
knowledge
Participant
Posts: 101
Joined: Mon Oct 17, 2005 8:14 am

change capture

Post by knowledge »

Hi ,

I am using scd type 2 ,

I am using change capture stage , which is working fine with the sample data , but when I am trying to load the real data , update is failing , though the records in before and after sets are similar it is giving update that is change_code=3 ,

I ceated two table with 5 records which are exact copy , then from after data set I changed 2 for update , 1 for insert and 1 delete , I got the exact result , but with real data total count for after data(source) set 414925 , before (target ) data set is 414926 , output of change capture stage gives me 414928 out of which 414923 are update 3 delete and 2 insert ,

but when I checked the update data it is exactly same as target source ,
it shouldnt give update it should be copy ,

I selected the option implicit keys and all values and I did not even include the field like rec_effective_date, rec_exeration_date or delete_flag which may cause the problem , but then also I am not getting exact count for update ,

please suggest ,
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

Be very careful with CHAR and VARCHAR combinations and trimming as sometimes your before values get implicitely modified and no longer match your after values. Try removing columns from the value list one at a time via explicit value settings until you find which field is causing the problem.
knowledge
Participant
Posts: 101
Joined: Mon Oct 17, 2005 8:14 am

all values

Post by knowledge »

Thanks for the replay ,

But I have used the option explicite keys and all values , and the before and after meta data table definition are loaded from the same that is target table meta data ,

then also the meta data will cause the problem ,

pl suggets ,

thanks
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

HI,
If that is the case it shouldn't be a problem.
But let us know how you determine that the both files are identical. For testing purpose just make a copy of the same file and give the two inputs and check.
It shoudl work fine.

-Kumar
thebird
Participant
Posts: 254
Joined: Thu Jan 06, 2005 12:11 am
Location: India
Contact:

Post by thebird »

Hi,

Also make sure that you have used the right partitioning mode for the Change capture stage. I believe that incorrect modes can also cause problems like this. Suggest that you use the Hash partitioning on the After and Before datasets .

Regards,

The Bird.
knowledge
Participant
Posts: 101
Joined: Mon Oct 17, 2005 8:14 am

Hi

Post by knowledge »

Hi ,

I am using hash partitioning for both before and after dataset , I used sort stage , and same partitioning keys for sort and change capture , the meta data is same for both , though the data has not been changed but I am getting updates ,

pl suggest what may be the cause ,

thanks
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Hi,

Try to find

Code: Select all

diff file1 file1
from unix.
It will reveal the uniquness of the files.

-Kumar
Post Reply