Null issues

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
PilotBaha
Premium Member
Premium Member
Posts: 202
Joined: Mon Jan 12, 2004 8:05 pm

Null issues

Post 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..
Earthbound misfit I..
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
Last edited by ArndW on Fri Oct 28, 2005 10:04 am, edited 1 time in total.
track_star
Participant
Posts: 60
Joined: Sat Jan 24, 2004 12:52 pm
Location: Mount Carmel, IL

Post 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)?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Doesn't "null issues" mean that there's no problem? Or, at least, no known problem? . :lol:

(Sorry, couldn't resist.)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Mark Balwin, is that you posting under Ray's name? I'd recognize that sense of humour anywhere :shock:
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

'Tis really me, Arndo-san.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
PilotBaha
Premium Member
Premium Member
Posts: 202
Joined: Mon Jan 12, 2004 8:05 pm

Post 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:
Earthbound misfit I..
PilotBaha
Premium Member
Premium Member
Posts: 202
Joined: Mon Jan 12, 2004 8:05 pm

Post 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
Earthbound misfit I..
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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:
Raog
Participant
Posts: 8
Joined: Thu Oct 13, 2005 8:53 am

Re: Null issues

Post 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..
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

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