Page 1 of 1

Aggregator stage nullability issue

Posted: Tue May 08, 2012 3:04 am
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?

Posted: Tue May 08, 2012 4:12 pm
by ray.wurlod
Yes. It's weird, but that IS the default behaviour.

Posted: Wed May 09, 2012 12:40 am
by soumya5891
Is there any dedicated logic for making the aggregated output columns in aggregator stage always nullable?

Posted: Wed May 09, 2012 1:55 am
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.

Posted: Wed May 09, 2012 9:47 am
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.