You are not logged in.
Announcement
Unanswered posts
|
Elvis is right that whatever fields are not aggregated need to be part of the group by. If you want the other 5 columns to include data, add them to the group by section of tAggregateRow.
If you don't want these columns, change your input format (via a tMap) to only include the 5 columns you need.
If you think about it what else is the component to output?
Say you have the following date
Group, ValuetoSum, OtherValue
A,1,1
A,1,2
A,3,3
B,2,4
B,1,5
The first 2 columns are easy
A,5
B,3
But what value should you return for the third, it could I guess return:
A,5,1
B,3,4
i.e. the first value or
A,5,3
B,3,5
the last but either is not strictly speaking right.
If you try the same in SQL i.e.
Select Group, SUM(ValuetoSum) asValuetoSum , OtherValue
from foobar
group by Group
It'll throw an error.
It works, but its not "beautiful" ... is there no other solution?
If you have aggregated the multiple rows together then the component doesn't know how to handle the columns that you HAVN'T specified should be MAX'd or SUM'd.
In this circumstance I generally use first, last, max or min on the other columns.
Does this make sense?
I have some Problems with tAggregatedRow.
tAggregatedRow itself works fine. I Make som max and sum and everythink is correct.
BUT: My datastream has 10 columns, only 4 of them are aggregated over 1 group-column. Bevor the tAggregated-Step ... tlog shows me data in all 10 columns, after the tAggregated-Step a tlog shows me only in 5 (in the aggregetd and used columns) of 10 columns data. The Rest is emty, but there. Whats wrong?