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

What can we do with datastage director?

0 Answers  


what is the diff between sequential file and fileset stages?

3 Answers  


What are the functionalities of link partitioner?

0 Answers  


what is the differeces between hash and modulus partition methods

4 Answers   TCS,


how to cleansing data

6 Answers   Cap Gemini,






HOw Hash Partion Works Thank you in Advance i have doubts on Hash Partion TEch Could please give me the clear understandable notation example e_id,dept_no 1,10 2,10 3,20 4,20 5,30 6,40 i have TWo Nodes/Three Nodes My questions are: 1).if i select hash key as e_id how Hash partion will distribute the data in to two NOdes/three NOdes 2).if i select hash key as dept_no how Hash partion will distribute the data in to two NOdes/three NOdes sivakumar.katta7@gmail.com

5 Answers   FIS,


how to configure databases through datastage

2 Answers  


Can you explain how could anyone drop the index before loading the data in target in datastage?

0 Answers  


Field,NVL,INDEX,REPLACE,TRANSLATE,COLESC

0 Answers   CTS,


if we using two sources having same meta data and how to check the data in two sources is same or not? and if the data is not same i want to abort the job ?how we can do this?

1 Answers   IBM,


col1 123 abc 234 def jkl 768 opq 567 789 but i want two targetss target1 contains only numeric values and target2 contains only alphabet values like trg1 123 234 768 567 789 trg2 abc def jkl opq

9 Answers   Patni,


AGGREGATOR default datatype

0 Answers   CTS,


Categories