The JOB every hour brings me a different result

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
igorbmartins
Participant
Posts: 161
Joined: Mon Mar 17, 2008 10:33 am

The JOB every hour brings me a different result

Post by igorbmartins »

Friends, I am here again with other doubt with aggregator.
I have a column containing a value 1 to 30. I want to get the average value. The correct result is 15,50 but the JOB every hour brings me a different result as 15,49 or 15,50 or 15,51.

Anybody know explain me what is happing?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Probably rounding when converting from dfloat to decimal. Remember that dfloat can not be accurately stored.

If you want accurate, consistent results, use the Preserve Type option (if using version 8.1).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rajeshananthapalpu
Participant
Posts: 4
Joined: Mon Oct 19, 2009 2:57 am

Re: The JOB every hour brings me a different result

Post by rajeshananthapalpu »

Before aggregator, you need to select hash partition with correct partition keys if you are using multinode config file..
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

try converting it to decimal(10,4) and then apply decimaltodecimal() to convert it to 5,2.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Preserve Type exists as an option in the 7.5.2 release. You also have the Default to Decimal Output option that may help as well.
-craig

"You can never have too many knives" -- Logan Nine Fingers
igorbmartins
Participant
Posts: 161
Joined: Mon Mar 17, 2008 10:33 am

Post by igorbmartins »

My server version is 7.5.1.A
I do this, I setting the Default output to 5,2.

I setting the partitioning hash in the transformer before of the aggregator.
Post Reply