handling null data in 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
dnat
Participant
Posts: 200
Joined: Thu Sep 06, 2007 2:06 am

handling null data in change capture stage

Post by dnat »

Hi,

I have a job where i am comparing an oracle table and a sequential file. I have a key column and 2 columns (change values) for which the change needs to be detected. I updated the table with the records in sequential file. So, i deally when i run the job for the second time, all the records should be considered as "copy" records.
But few of them came out as edit records. When i checked the change_code, this "edit" is happening only for records where one of the "change_Values"(i.e columns where there is a change should be detected) is null.
The columns are null in the table as well as the file. But they are considered as "Edit"
Is there any way where we can handle this null issue.
Suman
Participant
Posts: 53
Joined: Thu Oct 07, 2004 8:28 am

Re: handling null data in change capture stage

Post by Suman »

dnat wrote:Hi,

I have a job where i am comparing an oracle table and a sequential file. I have a key column and 2 columns (change values) for which the change needs to be detected. I updated the table with the records in sequential file. So, i deally when i run the job for the second time, all the records should be considered as "copy" records.
But few of them came out as edit records. When i checked the change_code, this "edit" is happening only for records where one of the "change_Values"(i.e columns where there is a change should be detected) is null.
The columns are null in the table as well as the file. But they are considered as "Edit"
Is there any way where we can handle this null issue.

You can change the null values in the file to some default value and also in the oracle table use the NVL function to convert to same default value you are using in file. Then compare.

Suman
manishk
Participant
Posts: 32
Joined: Tue Oct 25, 2005 8:45 pm

Post by manishk »

You can use NulltoEmpty() function also and then compare . I should work.
Thanks
Manish
dnat
Participant
Posts: 200
Joined: Thu Sep 06, 2007 2:06 am

Post by dnat »

Thanks. i assigned some default values to null and it worked.
Post Reply