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'
nulls to zero in aggregator stage
Moderators: chulett, rschirm, roy
-
- Charter Member
- Posts: 822
- Joined: Sat Sep 17, 2005 5:25 pm
- Location: USA
Re: nulls to zero in aggregator stage
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..
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..
Thank you..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'
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
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.