Page 1 of 1

desining approach

Posted: Thu Apr 12, 2007 6:33 am
by scorpion
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

Posted: Thu Apr 12, 2007 7:16 am
by DSguru2B
So you want to split your file into four files, one for each zone, yes?
On what basis do you want do get the average age?

Posted: Thu Apr 12, 2007 7:58 am
by kris007
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.