How to get integer output from Aggregater ?

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
vbeeram
Participant
Posts: 63
Joined: Fri Apr 09, 2004 9:40 pm
Contact:

How to get integer output from Aggregater ?

Post by vbeeram »

I am doing sum on Quanity column(Using Aggregater Stage),output must be integer type,so how to get integer value after Aggregation?
Any ideas....

Regards
Beeram
dsxdev
Participant
Posts: 92
Joined: Mon Sep 20, 2004 8:37 am

Post by dsxdev »

In general DS treats all default numeric vales as decimals.
In Aggregator Stage output is always decimal. If you really want an Integer result you may have to type cat the result to Integer.
Happy DataStaging
RobertScarbrough
Participant
Posts: 24
Joined: Fri Oct 01, 2004 1:43 pm
Location: USA

Re: How to get integer output from Aggregater ?

Post by RobertScarbrough »

Go ahead and define it as Decimal n,0 on the Stage-Properties tab. This will format the value like an integer by not having the decimal or the precision.
mandyli
Premium Member
Premium Member
Posts: 898
Joined: Wed May 26, 2004 10:45 pm
Location: Chicago

Post by mandyli »

Hi

In the Aggregator stage stage Stage-Properties input tab define it as decimal (9,0) then stage properties particular calculation column give Decimal 9,0 then Output tab once again defined as Integer. This way to get integer out put from Aggregator.

Thanks
Man
jayankurianvarghese
Participant
Posts: 10
Joined: Thu Aug 12, 2004 5:02 am
Location: UAE
Contact:

Re: How to get integer output from Aggregater ?

Post by jayankurianvarghese »

If you are passing an integer value, then you will get out put also as integer. But the out put field will be always decomal. If you want to change you can set the range of the decimal part as 0. Try it.
Post Reply