Getting current and previous values

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
vcsasikala
Participant
Posts: 26
Joined: Wed Jun 20, 2007 1:13 am
Location: Chennai

Getting current and previous values

Post 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
Regards,

Sasikala V C
Maveric
Participant
Posts: 388
Joined: Tue Mar 13, 2007 1:28 am

Post 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.
Post Reply