Page 1 of 1

Getting current and previous values

Posted: Mon Nov 26, 2007 2:53 am
by vcsasikala
I'm havuing a column PERS_ID.

I need to get the current and previous values on each run.

My stage variables:

PrevPersId : CurrPersId
CurrPersId : InputLnk.PERS_ID
(Initial Value=0)

I'm using two nodes configuration file. I have used hash partition. Data are spliting in two nodes.
Input
111
111
111
222
333
444
555
666
666

Actual Output:
Previous Current
0 222
222 333
333 444
444 555
0 111
111 111
111 111
111 666
666 666

Expected output
Previous Current
0 111
111 111
111 111
111 222
222 333
333 444
444 555
555 666
666 666


Plz help me in this issue.... Thanks in advance

Posted: Mon Nov 26, 2007 3:19 am
by Maveric
What is happening over here is that records
0 222
222 333
333 444
444 555
have gone to one node and
0 111
111 111
111 111
111 666
666 666 have gone to another node. Effectively 222 becomes the first record on node 1 and 111 is the first record on node 2. You will have to run the transformer in sequential mode to get the required output.