Handling nulls in BuildOps

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Larry.Griffith
Premium Member
Premium Member
Posts: 7
Joined: Wed Nov 02, 2005 12:19 pm

Handling nulls in BuildOps

Post by Larry.Griffith »

I am having problems handling nulls in a BuildOp I have created.

My input schema has four columns one of which, column_value, is defined as column_value:nullable string[max=255] {null_field='',prefix=2}. I am trying to move this column to my output schema, to a column with the same name, which is defined exactly the same, column_value:nullable string[max=255] {null_field='',prefix=2}.

I keep getting and accessor error.

DataPointsSplit,0: Fatal Error: Null value on the accessor interfacing to field "column_value".

I can assign constant to the output column so I am assuming the problem is with the input column.

I have tried testing the input column using the methods in the null.h header file, but have not been able to correct the issue.

Can anyone give me any direction on what I am doing wrong?
Thanks
Larry
Larry.Griffith
Premium Member
Premium Member
Posts: 7
Joined: Wed Nov 02, 2005 12:19 pm

Figured out handling nulls in BuildOps

Post by Larry.Griffith »

BuildOp Noob mistake

If you look at the code, the process defines a method for you called <fieldname>_null(). It returns true if it is null, false if it is not.

Two days trying to figure out something that was already done for me ... UGH!
Thanks
Larry
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Thanks for helping future noobs to avoid this one!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply