How to calculate max in DS

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
tanaya.deshpande@tieto.co
Participant
Posts: 94
Joined: Sun Jul 18, 2010 11:35 pm

How to calculate max in DS

Post by tanaya.deshpande@tieto.co »

I have 7 employees coming in a single stream whose salary is different on Monday ,Tuesday and Wednesday.
Now I want to calculate
1) total salary of each employee.for three days..... after that
2)the employee who has max salary

How can I impliment this in DS
GJ_Stage
Participant
Posts: 131
Joined: Mon Oct 27, 2008 6:59 am

Post by GJ_Stage »

Please use aggregator stage.
soumya5891
Participant
Posts: 152
Joined: Mon Mar 07, 2011 6:16 am

Post by soumya5891 »

1. First need a dummy col with any value say 1 you can do it in a transformer stage or col generator stage

2. Need a aggregator stage where you determine total salary of the employee

2. Now use a sort stage and sort the salary in descending order and then remove duplicate on the basis of dummy col

You will get the highest salary
Soumya
tanaya.deshpande@tieto.co
Participant
Posts: 94
Joined: Sun Jul 18, 2010 11:35 pm

Post by tanaya.deshpande@tieto.co »

Thanks a lot :D
devesh_ssingh
Participant
Posts: 148
Joined: Thu Apr 10, 2008 12:47 am

Post by devesh_ssingh »

you can put resolve :)
Post Reply