aggregator max(col)

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Mallayagari
Participant
Posts: 15
Joined: Tue Apr 20, 2004 3:10 am

aggregator max(col)

Post by Mallayagari »

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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

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.
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.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Truncation in what factor?
Is it rounding off values or striping of few characters?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
csrazdan
Participant
Posts: 127
Joined: Wed May 12, 2004 6:03 pm
Location: Chicago IL

Post by csrazdan »

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
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

"s-case" - Is there any new options available.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
csrazdan
Participant
Posts: 127
Joined: Wed May 12, 2004 6:03 pm
Location: Chicago IL

Post by csrazdan »

s-case is support case. Since patch is already available that is way it is support case otherwise it will be engineering case.
Assume everything I say or do is positive
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

csrazdan wrote:s-case is support case. Since patch is already available that is way it is support case otherwise it will be engineering case.
Oh, thanks.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply