Capture changes at file level

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
reachsam11
Participant
Posts: 26
Joined: Wed Mar 17, 2010 11:05 am

Capture changes at file level

Post by reachsam11 »

The requirement is to capture changes at sequential file level (about 50 columns). Any column may have changes. Is there a way to capture the changes (insert, delete, update indicator) without specifying all 50 columns as keys in Change Capture stage?
chowdhury99
Participant
Posts: 43
Joined: Thu May 29, 2008 8:41 pm

Post by chowdhury99 »

I don't think so. You have to specify those columns.

Thanks
vivekgadwal
Premium Member
Premium Member
Posts: 457
Joined: Tue Sep 25, 2007 4:05 pm

Re: Capture changes at file level

Post by vivekgadwal »

reachsam11 wrote:The requirement is to capture changes at sequential file level (about 50 columns). Any column may have changes. Is there a way to capture the changes (insert, delete, update indicator) without specifying all 50 columns as keys in Change Capture stage?
You need a set of keys, which will uniquely identify a row and then the stage will compare all the values of the other fields inside a Change capture stage as far as I know. You might want to consider using the "Difference" stage.
Vivek Gadwal

Experience is what you get when you didn't get what you wanted
rhale
Premium Member
Premium Member
Posts: 7
Joined: Wed Sep 07, 2005 5:20 pm

Re: Capture changes at file level

Post by rhale »

We solved this problem in 7.5.2 by writing a build op that did the comparisons. Our requirement was given a set of data in the format of

Code: Select all

any number of keys|any number of data columns|row stats such as update date and update user, 
produce a row of data for each column changed based on keys. The produced row was of the format

Code: Select all

keys|old value|new value|row stats
We send it a sorted data set and it produces the rows we need.
Robert Hale
TSYS Acquiring Solutions
reachsam11
Participant
Posts: 26
Joined: Wed Mar 17, 2010 11:05 am

Re: Capture changes at file level

Post by reachsam11 »

Thanks for the repsonses..I will try them out..
ReachSam
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Try the unix diff command or its variations.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Set the Change Mode property to Explicit Keys, All Values

Use a Difference stage with All non-Key Columns are Values or a Compare stage (depending precisely on the form of output you need)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
reachsam11
Participant
Posts: 26
Joined: Wed Mar 17, 2010 11:05 am

Post by reachsam11 »

Thanks, this works!!!

ray.wurlod wrote:Set the Change Mode property to Explicit Keys, All Values

Use a Difference stage with All non-Key Columns are Values or a Compare stage (depending precisely on the form of output you ...
Post Reply