Reading the target data as look up

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
deva
Participant
Posts: 104
Joined: Fri Dec 29, 2006 1:54 pm

Reading the target data as look up

Post by deva »

Hi,
I have one requirement. While loading the data , based on the previous record we have to compare the current value. If its true I have to copy the previous column value in to current column.

How can I do this rek. I am using hash file to read the previous record.

please explain me.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That's how you would do it - use a hashed file to store and lookup the current value. What's not working for you? Are you building some kind of SCD?
-craig

"You can never have too many knives" -- Logan Nine Fingers
gateleys
Premium Member
Premium Member
Posts: 992
Joined: Mon Aug 08, 2005 5:08 pm
Location: USA

Re: Reading the target data as look up

Post by gateleys »

deva wrote:Hi,
I have one requirement. While loading the data , based on the previous record we have to compare the current value. If its true I have to copy the previous column value in to current column.

How can I do this rek. I am using hash file to read the previous record.

please explain me.
Define 'previous'.

If you mean previous row in a sorted data, then you could use the function RowProcGetPreviousValue().
gateleys
gateleys
Premium Member
Premium Member
Posts: 992
Joined: Mon Aug 08, 2005 5:08 pm
Location: USA

Re: Reading the target data as look up

Post by gateleys »

You could also use RowProcCompareWithPreviousValue() to perform the comparison.
gateleys
Post Reply