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
Answer / sid
source->aggregate(with group key-ID,Avg(salary))-->Target
| Is This Answer Correct ? | 5 Yes | 1 No |
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 |
Answer / ramakrishna
SRC-aggregator-tgt
In the aggregator take the avg
| Is This Answer Correct ? | 0 Yes | 0 No |
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 |
what is the difference between lookup stage reject link and merge stage reject link in datastage Parallel jobs? interm of output in Merge Reject link and Look Up Reject link ?
How to read multiple files at different directories using a single Sequential File stage in DS Enterprise Edition
I have source file which contains duplicate data,my requirement is unique data should pass to one file and duplicate data should pass another file how?
can explain wt is the pool for file.
How to read multiple files using a single datastage job if files have the same metadata?
What is a merge in datastage?
country, state 2 tables r there. in table 1 have cid,cname table2 have sid,sname,cid. i want based on cid which country's having more than 25 states i want to display?
In a batch if a job fails in between and you want to restart the batch from that particular job and not from the scratch then what will you do?
IS FILE SET CAN SUPPORT I/P AND O/P LINK AT A TIME?
5) A file contains 10 (1-10) I want trgt like Trgt 1 trgt 2 trgt 3 1 2 3 4 5 6 7 8 9 10
if a column contains data like ram,rakesh,madhan,suraj,pradeep,bhaskar then I want to place names separated by commas in another columns how can we do?
What is the version control how can i apply this in DataStage can any one tell me the anser