Page 1 of 1

writing many columns which has null values to a seq. file?

Posted: Wed May 24, 2006 2:51 pm
by mctny
Hello Everybody,
I have a problem with a stage output in a job which has many column value as null. I want to write these data to a sequential file. I have to find a way to handle nulls for every column, not only for one. there are many columns which might be null, and I don't want to edit string properties for every column. is there anyway to issue a statement like;

if anycolumn in anyrow is null, then write a special character for that value into the seq file, otherwise just write the value to the seq file.

or do you have any routine or funtion implement this, or do you have any advise?

thanks
Cetin

Posted: Wed May 24, 2006 2:57 pm
by ray.wurlod
You can specify how null is to be represented as a record level property. You can override that at the individual column level using Edit Row (right click on that column in the Columns grid to expose the menu from which you can open the Edit Row dialog).

Posted: Wed May 24, 2006 4:08 pm
by mctny
ray.wurlod wrote:You can specify how null is to be represented as a record level property. You can override that at the individual column level using Edit Row (right click on that column in the Columns grid to expose the menu from which you can open the Edit Row dialog).
I just became a premium member to read your answer, however I couldnot quite get it, my problems is there are almost 50 columns that I have to convert the potential null values to some special charater before writing seq files. if you consider there are three files to be written like that and I also decode these special character back to null before I write to Database. so I wouldnot want to edit 6 X 50 = 300 column string properties. so how can I do it stage level or (in any stage or in a transformer). you mentioned about the possibility of doing it in the record level, how would I do that? I am very new to these,

Posted: Wed May 24, 2006 5:34 pm
by ray.wurlod
See page 5-15 of Parallel Job Developer's Guide which describes the (mutually exclusive) Null Field Length and Null Field Value properties that you can use on the Inputs link Format tab in the properties editor. Which one is correct for you will depend on the format of the file you are writing.

Posted: Thu May 25, 2006 6:32 am
by mctny
ray.wurlod wrote:See page 5-15 of Parallel Job Developer's Guide which describes the (mutually exclusive) Null Field Length and Null Field Value properties that you can use on the Inputs link Format tab in the properties editor. Which one is correct for you will depend on the format of the file you are writing.
thank you very much, I wil check and see.