Page 1 of 1

nulls to zero in aggregator stage

Posted: Thu Aug 03, 2006 1:29 pm
by DS1
Hello,

the aggregator stage converts nulls to zero for the columns used for calculations.

is this a very reliable way / right way ????
or is it safer to use a modify stage before the aggregator stage to make the nulls in the caculation fields '0'

Posted: Thu Aug 03, 2006 1:43 pm
by us1aslam1us
It is always better to do Null handling before processing.
Null is defined as unknown value and if you do add/sub/mul/div on any null value will return you an unknown value.

Sam

Re: nulls to zero in aggregator stage

Posted: Thu Aug 03, 2006 2:26 pm
by meena
HI DS1,
If you are extracting data from a table then you can use a NulltoZero function in the SQL query else you can pass the data first to the transformer and use a function called NulltoZero in the transformer and next pass to the aggregator..It depends on your source whether to use transformer and aggregator stages are not. Because if your source is any database we can do it in SQL query both the calculations and nulltozero. And again it depends on what kind of calculations you want to do..

DS1 wrote:Hello,

the aggregator stage converts nulls to zero for the columns used for calculations.

is this a very reliable way / right way ????
or is it safer to use a modify stage before the aggregator stage to make the nulls in the caculation fields '0'
Thank you..

Posted: Thu Aug 03, 2006 7:32 pm
by ray.wurlod
There are some null-handling properties in the Aggregator stage that give you some alternative strategies. Investigate these.

Posted: Fri Aug 04, 2006 12:47 pm
by DS1
Thanks everyone for the response.

meena, the method you suggested is always there , thanks for it.

however i wanted to know -- if only 'sum' is calculated in the aggregator stage, is it okay if i donot use a modify / transformer to make null to zero.

in the dev I am not using any null to zero but the aggregator stage is still doing proper calculations and is even converting nulls to zero.

I wanted to know if its going to be okay even with huge chunks of data .

If anbody has faced issues with letting the aggregator stage do null to zero please let me know.

I will even try to work on null-handling properties as mentioned by Ray.

Thanks everyone.