Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


hi my source is::
empno,deptno,salary
1, 10, 3.5
2, 20, 8
2, 10, 4.5
1, 30, 5
3, 10, 6
3, 20, 4
1, 20, 9
then target should be in below form...

empno,max(salary),min(salary),deptno
1, 9, 3.5, 20
2, 8, 4.5, 20
3, 6, 4, 10
can anyone give data flow in data stage for the above
scenario....

thanks in advance...

Answers were Sorted based on User's Feedback



hi my source is:: empno,deptno,salary 1, 10, 3.5 2, 20, 8 2,..

Answer / lakshmi srinivas

source->copy->2 aggregators->join->target

1 aggregator->eno,max(sal),min(sal)

2 aggregator->eno,dno,max(sal)

by using max(sal) key, we can join both o/p of
aggregators,we can get that output...

Is This Answer Correct ?    13 Yes 1 No

hi my source is:: empno,deptno,salary 1, 10, 3.5 2, 20, 8 2,..

Answer / shar

the question framed wrong
it should have been
empno,dept,sal
1,10,9
1,10,8
1,10,7
2,20,7
2,20,8.5
2,20,9
3,30,4
3,30,6
then expecting an ans is correct
o/p
empno,max(sal),min(sal),deptno
1,9,7,10
2,9,7,20
3,6,4,30
---xx----

where as in the o/p of user's question
we have
empno,max(sal),min(sal),deptno
1,9,3.5,20
2,8,4.5,20
3,6,4,10
here empno=1 his max(sal)=9 from deptno 20 and min(sal)=3.5 then its deptno=? actually we r giving a correct information but client will get confused max(sal) and min(sal) r both from 20 or different departments.
-----xxx----
even though client is expecting the same output then laxmi answer is correct

Is This Answer Correct ?    0 Yes 0 No

hi my source is:: empno,deptno,salary 1, 10, 3.5 2, 20, 8 2,..

Answer / vinod upputuri

hai first use the copy stage. from that take three links.

in that first and second links are connected to aggregator
stages.

agg1-- max and min for sal group by empno...

agg2--max only group by empno...

then use lookup for agg2 and third link of copy stage...

in lookup join max{sal} to sal and get deptno...

finally, o/p links from agg1 and lookup are joined by
lookup.. join by max{sal}....


then u can get the desired o/p...

Is This Answer Correct ?    0 Yes 2 No

hi my source is:: empno,deptno,salary 1, 10, 3.5 2, 20, 8 2,..

Answer / eswararao

create one group using column generator and then Using Aggregator stage select max sal,min sal

Is This Answer Correct ?    1 Yes 5 No

hi my source is:: empno,deptno,salary 1, 10, 3.5 2, 20, 8 2,..

Answer / pankaj das, orator

Just take...
source -> aggregate stage -> target

And then in aggregate stage in output tab just specify

col name groupby derivation
------- ------- ----------
id group by id
max_sal max(sal)
min_sal min(sal)
deptno deptno

Is This Answer Correct ?    1 Yes 10 No

Post New Answer

More Data Stage Interview Questions

what is operator combinality in datastage?

1 Answers   TCS,


Hai..,This Kiran . how to immlement SCD's through sequential file.please explain briefly.if nt ask me i will explain ,what i know.

2 Answers  


What are routines in datastage? Enlist various types of routines.

0 Answers  


Two source files contains same meta data third file contains different data types can I funnel that file.

2 Answers  


where we use column generator stage in real time scenario?

5 Answers   TCS,


HOW U CAN ABORT THE JOB IF THE DATA IS DUPLICATE?

1 Answers   IBM,


Hi friends If anybody completed datastage 8.5 certification.Could please guide me what are the topics new in 8.5 certification.

2 Answers  


What is a folder? Difference types of stages?

0 Answers  


hi iam new to this tooliam cmpltied to know abt datastage so now iam in project tell me whole step by step what iam doing iwnt to go with exp so plz hlp me pals

0 Answers  


In which situations we can use normal and sparse lookup stages

4 Answers   IBM,


What is the precedence of stage variables,derivations, and constraints?

0 Answers  


What all the types of jobs you developed?

0 Answers  


Categories