Hi All,
I have a Input file has following columns:
Name, age, sex,pan,city,zone (there are 4 zones)
And I want out put file like for each zone(for 4 zones) I require sex and average age.
how should i approach this..
can any one help on this
tx in advance
desining approach
Moderators: chulett, rschirm, roy
desining approach
Thanx&Regards
scorpion
scorpion
Here's an approach based upon my understanding of your requirement:
1. Pass the data through an aggregator and group by Zone, Sex and then Sum on Age. Also create a COUNT column and maintain a count.
2. Now pass this data through a transformer stage where you divide the sum of age with the count.
1. Pass the data through an aggregator and group by Zone, Sex and then Sum on Age. Also create a COUNT column and maintain a count.
2. Now pass this data through a transformer stage where you divide the sum of age with the count.
Kris
Where's the "Any" key?-Homer Simpson
Where's the "Any" key?-Homer Simpson