Aggregator output nullability
Posted: Tue Nov 24, 2009 11:21 pm
Playing some aggregator games today and had some interesting issues, probably old news to many here but new to me (not having done much PX aggregation yet) and thought I would share. Needed to group by one field, sum three others and generate a count for each group.
Is the output from calculation fields always assumed to be nullable regardless of the setting in the stage? In spite of the fact that all fields had Nullable set to No all the way through the job, was still seeing messages like this:
OK... my source isn't nullable but I'll play the Modify game. Added one between the Aggregator and the Sequential File target of its handiwork and did the whole handle_null thing. It then complained about that:
Pfffttt... now suddenly my source is non-nullable so you don't need to handle nulls, you idiot. I had to switch the output columns of my Aggregator to actually show as 'Nullable' before this warning would go away.
Is this normal? Is calculation output always considered to be nullable even when I know it will never be and I mark it as such in the job?
Is the output from calculation fields always assumed to be nullable regardless of the setting in the stage? In spite of the fact that all fields had Nullable set to No all the way through the job, was still seeing messages like this:
Code: Select all
Aggregator_1: When checking operator: When binding output interface field "X" to field "X": Converting a nullable source to a non-nullable result; a fatal runtime error could occur; use the modify operator to specify a value to which the null should be converted.
Code: Select all
Modify_14: When checking operator: When binding output schema variable "outRec": When binding output interface field "X" to field "X": Null value handling is specified with a non-nullable source field and no conversion; ignoring.
Is this normal? Is calculation output always considered to be nullable even when I know it will never be and I mark it as such in the job?