Page 1 of 1

NULL trapping

Posted: Tue Feb 15, 2005 6:05 am
by NewPXUser
My job returned the message

When checking operator: When validating export schema: At field "inputcol": Exporting nullable field without null handling properties

I inserted a modify stage and tried both NullToValue and handle_null functions but still receive the same error. I have made a copy of the job and applied both in a transformer stage but still in vain.

Can anybody advise on where I am going wrong?

The method used is inputcol = handle_null(inputcol, 0) and
inputdesc = handle_null(inputdesc, "NULL")

Same as NullToValue in place of handle_null.

Posted: Tue Feb 15, 2005 6:26 am
by ArndW
Willkommen, NewPXUser.

good job in trying to use different methods to debug your problem! I think the cause might not lie in the actual data itself but in the meta-definitions within the job. What database/stage are you writing to and in which stage is the error message generated? I am fairly certain that if you change your output to a PEEK, sequential or fileset the error will go away (it won't be solved, but you'll be a step further towards solution).

Posted: Tue Feb 15, 2005 6:30 am
by NewPXUser
Yep.

As mentioned the same problem exists when using Sequential input and sequential output with just 10 dummy hardcoded rows - of which none are blank or null.

Posted: Tue Feb 15, 2005 6:47 am
by ArndW
Hmmm... I just wrote a quickie that uses nullable input fields and wrote to a sequential file in Px... no problems...

A couple of other possibilities - what does your configuration file say about null handling? Are you using auto column propagation and dropping/adding columns?

Posted: Tue Feb 15, 2005 6:48 am
by richdhan
Hi,

It is about the metadata and not about the data. The data might not be null or blank but the metadata might have the nullability set to YES.

If you are using modify stage use the following syntax

output_column=handle_null(input_column, value instead of null)

If you want the warning to be avoided when using sequential file stage then set the nullablity option that can be found in field properties column.

HTH
--Rich

Pleasure in job brings perfection in work

Posted: Tue Feb 15, 2005 7:01 am
by NewPXUser
Yes. You were correct. The 'Nullable' property was set to 'Yes'. On making it to 'No', the warning disappeared.

Having said that, the error appear to be misleading (atleast for people like me). It says

When checking operator: When validating export schema: At field "inputcol2": Exporting nullable field without null handling properties

but I had 'null handling properties' in place by NullToValue / handle_null.

Infact if I remove the null handling routine in the tx stage, the job still works without the warning !! The input has columns to be Nullable whereas the output says 'No' to it.

Posted: Tue Feb 15, 2005 8:17 am
by ArndW
NewPXUser - I misunderstood what you had said; my test job set a column to "nullable yes " and then used null and real values so of course I didn't see any problems. And here I was looking for column propagation errors :)

Posted: Tue Feb 15, 2005 2:32 pm
by T42
That warning message said it exactly: If your metadata is nullable, and you're attempting to write to a flat file without handling it by means of something like "Null Field Value" on "Field defaults", then you will get a warning, even though you may not have any data with NULL.

Next time: Ensure that there's no nullable fields, OR provide the operator with a way to handle NULL.