Page 1 of 1

problme with aggregator stage

Posted: Thu May 19, 2005 11:05 am
by supernova2005
Hello everyone,

I have an aggregator stage that calculates the sum of a decimal(13,2) field. Both input and output are defined as not nullable. The result of is correct, but I am getting the following warning message:


Aggregator_66: When checking operator: When binding output interface field "value1" to field "value1": Converting nullable source to non-nullable result; fatal runtime error could occur (use modify operator to specify value to which null should be converted)

Does anyone know what causes this warning message and how I can get rid of it?

Thanks.

Posted: Thu May 19, 2005 11:17 am
by amsh76
Whats your source?

Posted: Thu May 19, 2005 11:21 am
by supernova2005
amsh76 wrote:Whats your source?
both the source and the target are sequential files. but I don't think it is a problem, because I tried to replace them with datasets and the same thing happened.

Re: problme with aggregator stage

Posted: Thu May 19, 2005 11:22 am
by RobertScarbrough
From what I have read the only way to get rid of the message is to catch the field in a modify stage or a transformer in the subsequent output stage from the aggregator. I have talked with some folks from Ascential about it and it seemed to be like that is just the way it is.

Posted: Thu May 19, 2005 11:34 am
by ArndW
Supernova,

You will need to put in a Modify stage where you cast the datatype, or a TRANsform stage that does the same and also puts in a derivation that ensures no NULLs are passed down that column.

Unlike server, where the NULLable attribute really only applies when reading/writing to a Database stage, in PX you need to ensure continuity of attributes.

Posted: Thu May 19, 2005 2:44 pm
by ds_is_fun
The way AGGR stage works on sum of decimal type columns is. When it performs a SUM it makes sure that no row is "null". When we contacted an Ascential pro' with the same problem. He mentioned it was a compiler related error, where the code needs to changed to avoid this problem in future.
I changed the datatypes to the condition nullable = 'Y' in the Output of the AGGR stage.
Then I threw an additional stage, a transformer(most of the Architects would'nt like this). nullable from Input obviously is a 'Y' and change the output condition of nullable to 'N'. In the trasformer have derivation defaulting as IfIsNull(coulmn_name) then <value>.
This should get rid of the problem.
Good luck!

Posted: Fri May 20, 2005 2:39 am
by supernova2005
Yes, you are right. The warning messages disappeared. Thank you for the help.

ds_is_fun wrote:The way AGGR stage works on sum of decimal type columns is. When it performs a SUM it makes sure that no row is "null". When we contacted an Ascential pro' with the same problem. He mentioned it was a compiler related error, where the code needs to changed to avoid this problem in future.
I changed the datatypes to the condition nullable = 'Y' in the Output of the AGGR stage.
Then I threw an additional stage, a transformer(most of the Architects would'nt like this). nullable from Input obviously is a 'Y' and change the output condition of nullable to 'N'. In the trasformer have derivation defaulting as IfIsNull(coulmn_name) then <value>.
This should get rid of the problem.
Good luck!