sum and count function in Aggregate Stage Problem
Moderators: chulett, rschirm, roy
sum and count function in Aggregate Stage Problem
Hi,
Please help me . I want to aggregate records on this condition
Group by : Currency and my problem is actually how to find sum(price) and count (Material). When Iam selecting Aggregation Type = Count Rows. Iam not able to select Aggregatio type = calculation for Sum(price).
How to achieve sum and count function in aggregate stage.
Thanks,
Somaraju
Please help me . I want to aggregate records on this condition
Group by : Currency and my problem is actually how to find sum(price) and count (Material). When Iam selecting Aggregation Type = Count Rows. Iam not able to select Aggregatio type = calculation for Sum(price).
How to achieve sum and count function in aggregate stage.
Thanks,
Somaraju
somaraju
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Hi ,
I have created a output columm with Dummy and sql as integer and length =1 and I gave value as 1. This dummy is given as input to aggregator to count number of records and Its metadata in ouptut is decimal 8,2.
But Iam getting an error saying
main_program: Syntax error: Error in "group" operator: Error in output redirection: Error in output parameters: Error in modify adapter: Error in binding: Expected '=', got: "$", line 165
Thanks,
somaraju
I have created a output columm with Dummy and sql as integer and length =1 and I gave value as 1. This dummy is given as input to aggregator to count number of records and Its metadata in ouptut is decimal 8,2.
But Iam getting an error saying
main_program: Syntax error: Error in "group" operator: Error in output redirection: Error in output parameters: Error in modify adapter: Error in binding: Expected '=', got: "$", line 165
Thanks,
somaraju
somaraju
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Hi,
Now I connected Aggregator to the source transformer. Now Iam getting a warning saying
Aggregator_sum: When checking operator: When binding output interface field "TotalAmount" to field "TotalAmount": Converting a nullable source to a non-nullable result;
a fatal runtime error could occur; use the modify operator to
specify a value to which the null should be converted.
Thanks,
somaraju.
Now I connected Aggregator to the source transformer. Now Iam getting a warning saying
Aggregator_sum: When checking operator: When binding output interface field "TotalAmount" to field "TotalAmount": Converting a nullable source to a non-nullable result;
a fatal runtime error could occur; use the modify operator to
specify a value to which the null should be converted.
Thanks,
somaraju.
somaraju
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The most recent warning is a complaint about your job design, and a warning that - should a null arrive from the input - your job will abort because the output column is defined as not null. You must fix the design - probably (as suggested) with an upstream Modify stage to intercept the null and replace it with some default value.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.