Page 1 of 1

Current row to Next row processing

Posted: Tue Jan 10, 2012 9:27 am
by pratapsriram
I have a peculiar scenario. I want to capture the Time taken between two transactions and assign the elapsed time to the first transaction record. I could do this but assign to the next transaction instead of the first one. So if anyone can tell if the other way is possible? Please find the attached screenshot in the below

http://sites.google.com/site/makamsreer ... ow_nextrow

Posted: Tue Jan 10, 2012 9:59 am
by pandeesh
Once i had a similar scenario and achieved using stage variables in transformer stage.
By utilizing the power of stage variable to retain the previous value.
I don't think it's a peculiar scenario
:)

Posted: Tue Jan 10, 2012 10:32 am
by chulett
You've misread the requirement I'm afraid.

Posted: Tue Jan 10, 2012 3:19 pm
by ray.wurlod
Other than in the first two rows your example does not appear to be doing what you describe. Can you please clarify? In general DataStage does not have a lookahead capability; you may need to design to update the first row (of each pair?) subsequently.

Posted: Wed Jan 11, 2012 6:37 pm
by Kryt0n
You can try split and join with row x joining to x+1 and then you have both values on the same line. (Couldn't see your diagram so suggestion not based on anything reflected in that)

Edit: Except you're on server... could've sworn I saw Parallel...

Posted: Wed Jan 11, 2012 7:01 pm
by Kryt0n
Reverse the order so that the oldest record is last, then use stage variables to hold the newer time.

Resolved - Please close

Posted: Wed Jan 18, 2012 4:02 pm
by pratapsriram
Kryt0n wrote:Reverse the order so that the oldest record is last, then use stage variables to hold the newer time.
Thanks, Yes this is what I did exactly. I ordered in desc order and then processed using stage variables.