Page 1 of 2

Null Handling

Posted: Mon Jul 02, 2007 9:54 am
by edward_m
Hi All,

I am trying to load data into sequential file however i am getting following error when the source column coming as null.

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

Seq file definitions..

column LAST_UPDATE_DATE
sqltype timestamp 38
nullable yes
description none

file format
delimiter string \31
null field value ''
quote none

Could anbody throw some light on this..

Thanks in advance..

Posted: Mon Jul 02, 2007 11:42 am
by DSguru2B
Search on "null_field" length (0) must match field's fixed width. The same sarch retrieved 17 results. One of the them ought to help you.

Posted: Mon Jul 02, 2007 3:11 pm
by us1aslam1us
Null Field Value property of the "LAST_UPDATE_DATE" must have the same length as the fixed-width field length. Go to the column properties and add 19 spaces for the field.

Posted: Mon Jul 02, 2007 7:15 pm
by edward_m
us1aslam1us wrote:Null Field Value property of the "LAST_UPDATE_DATE" must have the same length as the fixed-width field length. Go to the column properties and add 19 spaces for the field.
I applied condition in tranformer stage if IsNull(LAST_UPDATE_DATE) Then '
' Else LAST_UPDATE_DATE, but this condition didn't work.

Please let me know where can i find column properties to define 19 spaces..

Thanks in advance..

Posted: Mon Jul 02, 2007 8:08 pm
by ArndW
Edward, the transform action doesn't affect this message. You need to right-mouse click on the column in the sequential file stage, then do and "edit row" and either explicitly set or remove the attribute there.

Posted: Mon Jul 02, 2007 10:40 pm
by keshav0307
in the sartget sequential file stage property, you should define the "null field value" may be '' or ' ', or you can set for individual fields too.
better define as file property, less effort.

Posted: Tue Jul 03, 2007 11:04 am
by edward_m
I modified as you directed still i amgetting the same error as before..

Posted: Tue Jul 03, 2007 1:11 pm
by ray.wurlod
Try putting 19 "*" characters in as the Null Field Value property.

Posted: Wed Jul 04, 2007 5:57 pm
by edward_m
Thanks..i have 97 nullable columns.So its hard for me to define '*' to each and every column based on their length.
Is there any alternative solution ??

Thanks in Advance..

Posted: Wed Jul 04, 2007 7:05 pm
by sanjay
edward

in general property of sequential file stage you can set that instead of each column.


Sanjay

edward_m wrote:Thanks..i have 97 nullable columns.So its hard for me to define '*' to each and every column based on their length.
Is there any alternative solution ??

Thanks in Advance..

Posted: Thu Jul 05, 2007 8:19 am
by edward_m
sanjay wrote:
in general property of sequential file stage you can set that instead of each column.
Thanks for your response Sanjay.

Could you please let me know where do we set up??
In sequential file i defined the following properties for under Format
Field defualts:
Delimeter = comma
Null Field value =''
Quote = none

Please advise..

Posted: Thu Jul 05, 2007 9:52 am
by ray.wurlod
edward_m wrote:Thanks..i have 97 nullable columns.So its hard for me to define '*' to each and every column based on their length.
Is there any alternative solution ??

Thanks in Advance..
No.

It's not hard. It's just tedious.

Posted: Thu Jul 05, 2007 9:59 am
by edward_m
Ray,

I don't see full content of your message because i am not premium member..could you please disable this as premium content..

Thanks...

Posted: Thu Jul 05, 2007 11:42 am
by ray.wurlod
There's nothing really premium about the content, which is why I disabled the Premium flag. Ordinarily I would not do so.

Posted: Thu Jul 05, 2007 2:30 pm
by edward_m
Thanks you very much Ray..