Aggregator stage nullability issue

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
soumya5891
Participant
Posts: 152
Joined: Mon Mar 07, 2011 6:16 am

Aggregator stage nullability issue

Post by soumya5891 »

I have three columns as below

Key1(Not nullable) Key2(Not nullable) Amount(Not nullable)

Now when I am aggregating Amount field on the basis of the Key1 and Key2.
Now when I map the output the field Amount automatically becomes Nullable.
Is it the default behaviour of the aggregator stage?
Soumya
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Yes. It's weird, but that IS the default behaviour.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
soumya5891
Participant
Posts: 152
Joined: Mon Mar 07, 2011 6:16 am

Post by soumya5891 »

Is there any dedicated logic for making the aggregated output columns in aggregator stage always nullable?
Soumya
jerome_rajan
Premium Member
Premium Member
Posts: 376
Joined: Sat Jan 07, 2012 12:25 pm
Location: Piscataway

Post by jerome_rajan »

I believe that this is the default behaviour and you won't need any dedicated logic to accomplish target nullability.

If all the values of your aggregation column come as nulls, then you can either choose the output sum to be output as 0 or NULL (see 'Allow Null Output' option in Aggregator). This will ensure that the output column will never contain nulls if you set the All null to false. This is the only way I can think of controlling the output nullability.
Last edited by jerome_rajan on Wed May 09, 2012 2:14 am, edited 1 time in total.
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn

Life is really simple, but we insist on making it complicated.
soumya5891
Participant
Posts: 152
Joined: Mon Mar 07, 2011 6:16 am

Post by soumya5891 »

If we convert all the measure of the aggregator to nullable no with using any null handling then input to aggregator in that case is not null.
Soumya
Post Reply