HOW TO FIND OUT MAX SALARY USING TRASFORMER STAGE

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
adisheshu.dwh
Participant
Posts: 12
Joined: Tue Aug 26, 2008 10:48 pm

HOW TO FIND OUT MAX SALARY USING TRASFORMER STAGE

Post by adisheshu.dwh »

HOW TO FIND OUT MAX SALARY USING TRASFORMER STAGE
HELP ME









THANKS IN ADVANCE
ADISHESHU.P
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard.

Please do not shout. (All capitals = shouting.)

Why do you specifically want to use a Transformer stage? It is more usual to use an Aggregator stage to find a maximum (or perhaps an SQL query).

It can, of course, be achieved, using the fact that stage variables are evaluated in the order in which they appear in the grid, so that a value from the previous row can be remembered. Therefore you only need to compare the current row with the previous row and update the running maximum where it is larger.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DS_SUPPORT
Premium Member
Premium Member
Posts: 232
Joined: Fri Aug 04, 2006 1:20 am
Location: Bangalore

Post by DS_SUPPORT »

interview question?
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

do you know how to find the MAX salary, similar logic will apply in your job
Alokby
Premium Member
Premium Member
Posts: 9
Joined: Wed Sep 15, 2004 7:27 am

Post by Alokby »

Use Stage variable.
compare prev to curr
set max
Save previouse value
Post Reply