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...

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?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are orabulk and bcp stages?

1110


describe the Steps to confiure a Qlogic switch

2372


Different ways a project can be moved to production ?...example ….export-import and Version control.

2430


Define Routines and their types?

1162


what are the devoleper roles in real time? plz tell i am new to datastage....

2142


options available in sequence job to run,validate?

1297


What are the different options associated with dsjob command?

1417


Differentiate between operational datastage (ods) and data warehouse?

1155


How a source file is populated?

1049


how can we validate the flat files using the date in the header and number of records in the flat file? Using both conditions at a time.

3326


Can you explain tagbatch restructure operator?

1158


What could be a data source system?

990


Define Job control?

1125


What are the difference types of stages?

1187


What are routines in datastage?

1314