Page 1 of 1

Handling nulls in BuildOps

Posted: Wed Oct 06, 2010 10:30 am
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?

Figured out handling nulls in BuildOps

Posted: Wed Oct 06, 2010 2:24 pm
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!

Posted: Wed Oct 06, 2010 3:29 pm
by ray.wurlod
Thanks for helping future noobs to avoid this one!