How to get max salary of an organization using data stage
stages...........
can any body help me plz.......
Answers were Sorted based on User's Feedback
Answer / naga
firstly read the file into database or sequential file and
make sure the file has company as a column in this file and
give its output to aggregator and in aggregator give
group=company and column to calculate=sal and maximum value
for output column=maxsal and do mapping to the dataset and
you will get the required result.
| Is This Answer Correct ? | 19 Yes | 4 No |
Answer / amjad
Hi Naga,
If we use Aggregator stage, it will give the max value from
different groups, as per your example, it will group by
company, then it will give the max sal from each group. but
how to max sal from all the groups, i mean the out put
should be only one value.
Ex:
COMPANY,SAL
A, 2000
B, 3000
C, 4000
A,5000
B,6000
C,7000
A,8000
B,9000
C,9999
if we do like you mention output will be like :
comp,maxsal
A,8000
B,9000
C,9999
But, the output should be only
C,9999
Plese let me if iam wrong.
| Is This Answer Correct ? | 10 Yes | 0 No |
Answer / guest
Frist using Sortstage sort the records based on sal column
for desc order and Each record unqiely identify using
surogatekey after that filterstage filter the first record
based on sur column and drag and drop only in sal column
in the output.Then We get the Max sal
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / nandhini
Create one dummy key and set the value as 1 for all input
columns and use remove duplicate stage. Here use this dummy
as key and use sorting, partitioning for dummy and company
columns & use sorting (descending) for salary column and in
properties tab, select duplicate to retain as last.
| Is This Answer Correct ? | 3 Yes | 0 No |
ok lets us say after getting result like
a,8000
b,9000
c,9999
acc to nandhini using dummy key would give me
a,8000,1
b,9000,1
c,9999,1
then use rem duplicate stage then we get 9999 as output after we assign retain duplicates=last for dummykey col.
what if
i have diff data and got output like below after aggreagation
a,9000
b,18000
c,10000
now what...?
| Is This Answer Correct ? | 0 Yes | 0 No |
How to lode data in sequntional files perform faster?
disign the complex job in u r project?(they are aksing only complex job design and then data flow...)
I have a few records all are same structures data, I want to store data in multiple targets how?
can a fact table contains textual information
6 Answers HCL, HCL BSERV, IBM,
What is the difference between the local container and shared container?
is it possible to access the same job by two users at a time in DataStage?
how to validate the jobs
What is the use of datastage director?
What are the various kinds of containers available in datastage?
How to get max salary of an organization using data stage stages........... can any body help me plz.......
I have load a Dataset in UAT with 2 Node configuration, imported the job into PROD environment which is 4 node configuration and using this DataSet as SRC to other job. will the job run fine or give any errors? If job runs fine, on how many nodes? 2 nodes or 4 nodes?
one file contains col1 100 200 300 400 500 100 300 600 300 from this i want to retrive the only duplicate like this tr1 100 100 300 300 300 how it's possible in datastage?can any one plz explain clearley..........?