Page 1 of 1

Difference Stage

Posted: Tue Jul 19, 2011 11:25 pm
by JJayadeep
I have two tables BEFORE and AFTER both of them have 4 columns

EQT_NAME
HUB_CODE
LOCATION_CODE
OS_TURN_TIME


I want to know what is the difference between 2 tables in terms of data content so I am using the Difference stage. In the difference stage I have put
EQT_NAME
HUB_CODE
LOCATION_CODE
as composite keys and validating the information. As per documentation there is a difference code which has 4 values 0,1,2 and 3 to identify Delete, Copy, Insert,, Update


But the datastage job is giving a problem when there are more rows in the AFTER table which are not there in BEFORE table because the AFTER table data is not moving to the OUTPUT. The output stage mapping just has BEFORE table columns showing up in the mapping panel. In the documentation it is given that the tool can identify inserts which I think is extra rows in AFTER table that are not present in BEFORE table.

Thanks

Re: Difference Stage

Posted: Wed Jul 20, 2011 12:57 am
by pragb
Can you use change capture stage for this because this will also give you the changes you are looking for...

Re: Difference Stage

Posted: Wed Jul 20, 2011 4:54 am
by JJayadeep
Yes the CDC worked and that I already had implemented, I was just trying to see what is the basic difference between Change Capture and Difference Stage because as per the document both of them provide the same output

Posted: Wed Jul 20, 2011 7:33 am
by fmou
This topic has been marked "Resolved."
I was just trying to see what is the basic difference between Change Capture and Difference Stage
So have you found out yet?

thanks

Posted: Wed Jul 20, 2011 3:54 pm
by ray.wurlod
They don't provide the same output. Look at the other fields that are output, rather than focusing only on the ChangeCode.

Posted: Thu Jul 28, 2011 8:44 am
by JJayadeep
Yes from what i have tested the difference stage just compares the BEFORE and AFTER file and is capable of determining the changes that have happened only for the BEFORE file.

Thanks,
Jayadeep