Page 1 of 1

Null issues

Posted: Thu Oct 27, 2005 4:34 pm
by PilotBaha
Ok, as a newbee I have a question about this null handling. I was not doing anything on null handling and the job started to give a lot of null errors. So, after doing a search on the board here, I decided to try null field length = 0 approach.

This time I am getting

Code: Select all

Code: 
Error when checking operator: At field "PRUSERNAME": "null_length" may only be used in conjunction with prefix length or link length

as an error.

I pretty much tried everything including:

- NullToEmpty() function in input fields

- Edit Colum Metadata -> Parallel -> Properties -> Nullable -> (different values such as "" or @)

The Parallel Job Developers Guide says that I should not be worried about input NULL checks when I am directly maping the data.

Dealing with these nulls is becoming pretty annoying at this point..

Posted: Fri Oct 28, 2005 1:38 am
by ArndW
Pilot,

the designer of the PX null handing system (an illegitimate issue from Mary Shelley and Freddy Kruger) has come up with some really wonderful ideas for torture - and when combined with the PX Sequential file stage (coded by a temporary resident from the depths of the 7th level of hell who was banished from there for cruelty) it is enough to drive even grown men to drink!

Take out the null_length in your case. Which null error handling message are you getting? Normally it should suffice to set the row attributes for null_value to what you want.

Posted: Fri Oct 28, 2005 8:01 am
by track_star
I must agree with Arnd on the developer of null handling capabilities in PX. However, what are you trying to do (read or write the file), and what is your desired outcome (leave an empty string, print a specific string, etc)?

Posted: Fri Oct 28, 2005 6:36 pm
by ray.wurlod
Doesn't "null issues" mean that there's no problem? Or, at least, no known problem? . :lol:

(Sorry, couldn't resist.)

Posted: Sat Oct 29, 2005 2:00 am
by ArndW
Mark Balwin, is that you posting under Ray's name? I'd recognize that sense of humour anywhere :shock:

Posted: Sat Oct 29, 2005 4:00 pm
by ray.wurlod
'Tis really me, Arndo-san.

Posted: Mon Oct 31, 2005 3:50 pm
by PilotBaha
track_star wrote:I must agree with Arnd on the developer of null handling capabilities in PX. However, what are you trying to do (read or write the file), and what is your desired outcome (leave an empty string, print a specific string, etc)?
My desire is simple, to read data from a SQL table into a sq file. Period.
I also noticed that there are some problems with metadata imports. The fields that I import the metadata from Oracle table have "Yes" in Oracle. When I import them DS puts "No" in the column definition. I have to go and correct the fields manualy after the import.

Arnd is right, a beer or ten can make a fat girl look like a model but won't cure the blues for null fields.. :)

Ray, you make me want to come to Vegas and get into "silly jokes" contests with you :) :lol:

Posted: Tue Nov 01, 2005 4:32 pm
by PilotBaha
Here's another data type issue..

Code: Select all

OE_PRTIMESHEET: When checking operator: When binding output interface field "PRID" to field "PRID": Implicit conversion from source type "int64" to result type "decimal[10,0]": Possible range limitation.
and on the seq file i get

Code: Select all

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

Posted: Tue Nov 01, 2005 4:37 pm
by ArndW
PilotBaha,

both are valid in the PX world, the warning can avoided by doing an explicit conversion in a modify stage, and the latter error needs to be dealt with in an explicit handler - either for that specific column (edit row attributes) or for that datatype.

Welcome to the wonderful world of Px :wink:

Re: Null issues

Posted: Thu Nov 03, 2005 10:14 am
by Raog
Hi,

If u want handle nulls and assign default value, go for NullToValue function.
If u want to assign null value to target column, u dont need to handle at all in px.

Thx,
Rao.
PilotBaha wrote:Ok, as a newbee I have a question about this null handling. I was not doing anything on null handling and the job started to give a lot of null errors. So, after doing a search on the board here, I decided to try null field length = 0 approach.

This time I am getting

Code: Select all

Code: 
Error when checking operator: At field "PRUSERNAME": "null_length" may only be used in conjunction with prefix length or link length

as an error.

I pretty much tried everything including:

- NullToEmpty() function in input fields

- Edit Colum Metadata -> Parallel -> Properties -> Nullable -> (different values such as "" or @)

The Parallel Job Developers Guide says that I should not be worried about input NULL checks when I am directly maping the data.

Dealing with these nulls is becoming pretty annoying at this point..

Posted: Tue Nov 08, 2005 12:02 am
by kumar_s
PilotBaha wrote:Here's another data type issue..

Code: Select all

OE_PRTIMESHEET: When checking operator: When binding output interface field "PRID" to field "PRID": Implicit conversion from source type "int64" to result type "decimal[10,0]": Possible range limitation.
and on the seq file i get

Code: Select all

SeqResources: When checking operator: When validating export schema: At field "PRID": Exporting nullable field without null handling properties
Hi,
As Arnd mentioned you can use the an explict conversion for the first warning.

For the later case,
your you try

Code: Select all

Edit Colum Metadata -> Parallel -> Properties -> Nullable -> (different values such as "" or @) 
should work out.
Try given spaces (' ') for char or varchar types and 0s for integer or decimal type.

regards
kumar