hi,
iam using aggregator stage inorder to do sum .
i want to calculate the sum of the salaries of the employers.
in aggregator stage i/p stage i didn't do any changes.
in the o/p stage, salary column- i derived as SUM(SALARY),i have GROUPED EVERY I/P COLUMN.
it doesn't show the sum, infact it just dumps data from source to target.
it doesn't perform any aggregation functions. am i missing something.shall i manually generate a extra column called sum in the source o/p data.
plz assist me.
cheers;
saama
Regarding aggregator stage
Moderators: chulett, rschirm, roy
Actually, it *is* performing aggregation functions. The problem is the fact that you are grouping on 'every input column' which sounds like it is making every record a separate group and so a singleton sum.
You can't pass any 'extra' columns to the Aggregator, only the ones actually involved in the aggregation. In this case, send in the Salary field and just whatever other field or fields want you want a sum of salaries for. It that's just per 'employer' then just send that field in with the salary field, group by employer and sum salary.
You can't pass any 'extra' columns to the Aggregator, only the ones actually involved in the aggregation. In this case, send in the Salary field and just whatever other field or fields want you want a sum of salaries for. It that's just per 'employer' then just send that field in with the salary field, group by employer and sum salary.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 36
- Joined: Wed Aug 09, 2006 12:18 am
- Location: Chennai