Let us say from input stream there are 10 columns coming and I'm grouping based only on 2 columns and assume plus one column as SUM,
how to map remaining 7 columns from input to output? Or through the aggregator?
As aggregator will not allow remaining columns directly mapped from input to output because they should have some group by function
As the number of rows out is less than the number in you can't simply map ungrouped columns across. Typically one would use MIN() or MAX() for those columns so that only one value is passed per group.
-craig
"You can never have too many knives" -- Logan Nine Fingers
For each "other" column which value from all the records in the group do you want associated with the grouped value?
Maybe you could look at a "fork join" job design.
But think, how would you achieve the results in SQL? You can't. For exactly the same reasons you can not achieve the results using an Aggregator stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
perfect chulett ,thanks for solution,
but i m unable to find where should i set and enable the 'Preserve type' ?
i can see only decimal property for SUM column?
when i used max(name) or max of any varchar data type ,it be default populated dfloat or double in column filed i manuaaly set its datatype to varchar
but apart from that where should i set and enable the 'Preserve type' ?
I have no DataStage access and my documentation is at home which I am not, so I'm going to have to defer to the wisdom of others to answer that question at this very moment.
-craig
"You can never have too many knives" -- Logan Nine Fingers
Thanks all for your inputs ,so the solution is if you want to keep varchar data type in your group by flow use min amd max functions and use preserve type=TRUE only for varchar data type
and preserve type=FALSE only for numeric data type