NULL Handling in Aggregator

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
dscon9128
Participant
Posts: 25
Joined: Fri Jun 13, 2008 9:11 am

NULL Handling in Aggregator

Post 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
ds_developer
Premium Member
Premium Member
Posts: 224
Joined: Tue Sep 24, 2002 7:32 am
Location: Denver, CO USA

Post 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
Divya.A
Participant
Posts: 7
Joined: Mon Sep 08, 2008 11:41 pm

Post by Divya.A »

You can handle the null by adding an modify stage after the aggregator and you can handle nullability there
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Explore the Aggregator stage's null handling properties. Is this column a grouping column or a column for calculation?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kapil_333
Participant
Posts: 48
Joined: Tue Sep 09, 2008 2:39 am

Post 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 ?
NJOY......!!!!
Nagaraj
Premium Member
Premium Member
Posts: 383
Joined: Thu Nov 08, 2007 12:32 am
Location: Bangalore

Post 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.
Post Reply