Field Null Value Property not visible

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
Ahimsa
Premium Member
Premium Member
Posts: 78
Joined: Fri Aug 18, 2006 11:05 pm

Field Null Value Property not visible

Post by Ahimsa »

I want to set Field Null Value = '' but when I am doing Edit row on column, on Parallel tab its showing none Properties available. What should be done to make that property visible?

Thanks for your suggestions.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Which stage are you doing this in? In some you cannot modify this property.
Ahimsa
Premium Member
Premium Member
Posts: 78
Joined: Fri Aug 18, 2006 11:05 pm

Post by Ahimsa »

I was trying this in transformer stage. I remember seeing String width, Null Value Field property is the Transormer stage but somehow its now displaying right now.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Null Field Value is only displayed if the field is nullable.

If the field is nullable, but the Null Field Value property has not been selected, it is to be found in the "available properties to add" list.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
CharlesNagy
Premium Member
Premium Member
Posts: 66
Joined: Mon Feb 21, 2005 10:40 am
Location: Paris

Null Field Value not on Properties to add list

Post by CharlesNagy »

We are attempting to use an Oracle Enterprise stage to read some data. When processing a Timestamp field, we get the following error:

Oracle_Enterprise_11: When checking operator: When validating export schema: At field "JOURNAL_LINE_DATE": "null_field" length (0) must match field's fixed width (19)

(We have checked the data, and there are no null values there)

After checking various posts, I saw Ray's:
ray.wurlod wrote:Null Field Value is only displayed if the field is nullable.

If the field is nullable, but the Null Field Value property has not been selected, it is to be found in the "available properties to add" list.
The problem is that with Timestamp selected, I can see no available properties to add. Obviously, it is complaining that the null_field length should not be zero, but I cannot see where I can change it.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You need to add a valid date as the null value, i.e. "2008-12-31 23:59:59", assuming your system default is yyyy-mm-dd
CharlesNagy
Premium Member
Premium Member
Posts: 66
Joined: Mon Feb 21, 2005 10:40 am
Location: Paris

Post by CharlesNagy »

ArndW wrote:You need to add a valid date as the null value, i.e. "2008-12-31 23:59:59", assuming your system default is yyyy-mm-dd
Thanks, but we are doing this with the following code in the transformer:

NullToValue(Read_Table.JOURNAL_LINE_DATE, '1900-01-01 00:00:00')

Hence we are explicitly padding it out to 19 characters, which is our specified field width, but still we get the error.....
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Ok, then remove the error-causing default "null-field" attribute from the column defnition.
CharlesNagy
Premium Member
Premium Member
Posts: 66
Joined: Mon Feb 21, 2005 10:40 am
Location: Paris

Post by CharlesNagy »

ArndW wrote:Ok, then remove the error-causing default "null-field" attribute from the column defnition.
Thanks, but we tried that too and it didnt help. Actually, by a dint of experimenting we found the answer....

If you try to edit the metadata in the Oracle stage, you will not see the null field option. However, if you edit the table definition in Manager, and edit row on the problem column, then you will see the Null Field Length property available under "properties to add".

If you enable that and add in the length of your field, then reload the metadata for the table, the problem goes away...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

:idea:
Another argument for always maintaining table definitions in the Repository!
:)
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