Page 1 of 1

Comparing files

Posted: Tue Mar 13, 2007 1:59 pm
by muascdev
i have a need to compare 2 files and 2 specific columns in it.. i have a need to know what column got changed. is there anyway to find out what column got changed. i dont see anywhere in change captur /compare/difference stages that tells us.

Posted: Tue Mar 13, 2007 3:17 pm
by us1aslam1us
I think you can do that with either of them. Just read only two specific columns and do a compare. I haven't tried it but give it a shot.

Posted: Tue Mar 13, 2007 4:37 pm
by kumar_s
If Change Capture /Compare/Difference is all about that, not sure why can you find out. If you going to compare two files, obviously there would (should) be a command key. So use Explcit Keys and Explicit values option in Change Capture stage.

Posted: Wed Mar 14, 2007 8:16 am
by muascdev
my understanding is that all these stages will tell us if keys or values changed. if i want to know what coulmns got changed with in value columns, i didnt find any option.

Posted: Wed Mar 14, 2007 8:19 am
by DSguru2B
Make the columns you want to compare, as keys. Apply all rules of keys to these columns, like partitioning on it, sorting etc.

Posted: Wed Mar 14, 2007 4:58 pm
by kumar_s
Or join the two files using Join (perhaps a full outer join), user Transformer stage, compare the column one to one. Add a Flag column for each column that you need to check and mark the value according to the change, either Yes or No.