Page 1 of 1

NULL Handling in Aggregator

Posted: Mon Sep 08, 2008 6:00 pm
by dscon9128
Hello,

This is my job design:

"DB2--TRANSFORMER--FUNNEL---AGGREGATOR--FUNNEL---DATASET"

I have a field "amt1" coming from the DB2 which is nullable. I'm handling this nullability in the transformer by specifying it should take a value of 0 if it is null. The output of this goes to a funnel and then to an aggregator where I'm aggregating this "amt1" and outputting it to the rest of my job. This output(aggregate of 'amt1') is non-nullabe.

When I run my job it runs fine,but gives me warnings saying:

"Aggregator: When checking operator: When binding output interface field "amt1" to field "amt1": 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."


This warning is in the aggregator stage and I'm stuck here and do not know how to proceed further by removing this warning. I tried changing the nullability option in the column definitions of the aggregator stage and yet it still shows this warning.


Is there anyway I can handle this warning. Any help would be really appreciated.

Thanks,

dscon9128

Posted: Tue Sep 09, 2008 8:36 am
by ds_developer
You have a couple of options:
1. regardless of the message, you know a 'fatal runtime error' won't occur, right? So you could ignore the message.
2. if you really don't like the message, you could add it to the Message Handler in Manager. This is where you can tell DataStage to specifically ignore certain messages.
3. You could change the field in the DB2 stage to not nullable and add a function call to the SQL query to handle the null. In DB2, that is the 'coalesce' function (like the NVL function in Oracle).
Hope this helps,
John

Posted: Thu Sep 11, 2008 12:02 am
by Divya.A
You can handle the null by adding an modify stage after the aggregator and you can handle nullability there

Posted: Thu Sep 11, 2008 12:15 am
by ray.wurlod
Explore the Aggregator stage's null handling properties. Is this column a grouping column or a column for calculation?

Posted: Tue Sep 23, 2008 8:20 am
by kapil_333
Hi all,
I am also such warnings. The grouping NOT NULL .Is there any work arround for this other than supressing them ?

Posted: Tue Nov 18, 2008 3:25 pm
by Nagaraj
Hi "dscon9128"

Did you resolve this issue? if yes then please post with the solution mentioned....so that it makes a Complete post.