I need to calculate max of decmial(31,0) in aggregator stage. The output is also defined as decimal(31,0). But the output is truncating the values. Is there any limitation(length of column) on max function of aggregator????????????????? For small values its working fine.
Thanks in advance
aggregator max(col)
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The Aggregator stage calculates its results as dfloat, as a technique to avoid arithmetic overflow.
But there's another property in the Aggregations folder, called Default to Decimal Output, that defaults (if I remember correctly) to 8,2. This is applied if the data type of the output is Decimal or Numeric.
At the individual column level, you can also set the Decimal Output sub-property of the Maximum Value Output Column property. This also defaults to 8,2.
Use dfloat as your output column data types from Aggregator and convert them explicitly downstream.
But there's another property in the Aggregations folder, called Default to Decimal Output, that defaults (if I remember correctly) to 8,2. This is applied if the data type of the output is Decimal or Numeric.
At the individual column level, you can also set the Decimal Output sub-property of the Maximum Value Output Column property. This also defaults to 8,2.
Use dfloat as your output column data types from Aggregator and convert them explicitly downstream.
Last edited by ray.wurlod on Mon Apr 02, 2007 9:00 am, edited 1 time in total.
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.
For 7.5.1 there is a patch available. The aggregator stage provides a Preserve Type option which tells the operator to preserve the type of the input column to output column (in support of min/max) always creates (shows) an output column of type Double, which is incorrect. The user need to go into the Output Columns tab and correct this data type. IBM has logged this as an s-case to fix the bug in the UI and will add it to the next release
Assume everything I say or do is positive