i have a scenario in which i/p columns areID,salary with
1,1000 2,2000 and 3,3000 i need an extra column in the o/p
named avg(salary)how can i get it?

Answers were Sorted based on User's Feedback



i have a scenario in which i/p columns areID,salary with 1,1000 2,2000 and 3,3000 i need an extra ..

Answer / sid

source->aggregate(with group key-ID,Avg(salary))-->Target

Is This Answer Correct ?    5 Yes 1 No

i have a scenario in which i/p columns areID,salary with 1,1000 2,2000 and 3,3000 i need an extra ..

Answer / subhash

source -> Transforemer(add column DUMMY and give value 1)
==> 2links,
1st link(with 1 hard coded value) to Copy,
1,1000,1
2,2000,1
3,3000,1
2nd Link to Join,
1,1000
2,2000
3,3000

1st linkcopy -> aggregate (Group Key-->DUMMY, take avg)--
>Join
1,2000(AVG salary)
->Join --> target
1,1000,2000
2,2000,2000
3,3000,2000

Is This Answer Correct ?    2 Yes 1 No

i have a scenario in which i/p columns areID,salary with 1,1000 2,2000 and 3,3000 i need an extra ..

Answer / ramakrishna

SRC-aggregator-tgt

In the aggregator take the avg

Is This Answer Correct ?    0 Yes 0 No

i have a scenario in which i/p columns areID,salary with 1,1000 2,2000 and 3,3000 i need an extra ..

Answer / sai

source -> Transforemer(add column and give value 1) ->
copy -> aggregate (take sum)
->Join -> tx -> target

Is This Answer Correct ?    1 Yes 5 No

Post New Answer

More Data Stage Interview Questions

Define Merge?

0 Answers  


Hi guys, please design a job with derivation(solution). write exact conditions. My requirement Source table emp_no qualification 1 a 1 c 2 a 3 c 3 b Target table emp_no qualification 1 b 2 b 2 c 3 a Here every employer have three qualifications i.e a,b and c. what ever source table dont have some qualification, that will be move to target table. Like above. Hope u get the point. Thanks.

4 Answers   UHG,


What is APT_DUMP_SCORE?

2 Answers   IBM,


how can we extract data with out having any common column

7 Answers   IBM, Switch2iTech,


What can we do with datastage director?

0 Answers  






What is staging variable?

0 Answers  


which dim, fact tables used in bank domain

1 Answers   HSBC, IBM,


DataStage Scenario based Interview Questions

1 Answers  


What are the various kinds of the hash file?

0 Answers  


how to achieve this output ? Two Input columns(ID & Name) - ID | Name 1 | Jack 1 | Kara In output there should be only 1 column which will be populated as - 1,Jack 1,Kara

0 Answers  


how to call routines in stages?

3 Answers   ME,


what is materialized view used datastage?

1 Answers   HSBC,


Categories