Page 1 of 1

How to write nulls as nulls

Posted: Tue Aug 29, 2006 2:19 am
by Vijay Kumar
Hi,
I am getting the following warning message in the Job log:

Exporting nullable field without null handling properties

I am just reading a Oracle Table using Oracle Enterprise Stage and writing data into 2 sequential files based on some condition with out any transformations.

The job is as follows:

Oracle Enterprise Stage ---> Transformer --->(condition1) File1
---->(condition2) File2

The Null proterty was set to Yes for the fields which can have NULL value in both the source and Target.

Can any one help me out in resolving this warning issue?

Thanks in Advance.
Vijay

Posted: Tue Aug 29, 2006 2:30 am
by kumar_s
Also check through out the links including transformer.
Turn off RCP.
Try using NullToValue() and set null again for null values.
What is the datatype?

Posted: Tue Aug 29, 2006 2:53 am
by Vijay Kumar
kumar_s wrote:Also check through out the links including transformer.
Turn off RCP.
Try using NullToValue() and set null again for null values.
What is the datatype? ...
Thank you for the response.

RCP property is OFF and through out the job the Nullable property is set to Yes. All the fields are of Varchar Type.

As the amout of data that I am extracting is huge, I don't want to use NullToValue() function. If I use any operators it may slow down the performance.

Why the DS Job is throwing such warning msg when I don't perform any tranformations in my job. Can't we write Null value into a sequential file??

Posted: Tue Aug 29, 2006 2:58 am
by ArndW
You need to define the sequential file output handling of null values, this is where your error is originating. If you go into the output column in the designer, and right-mouse-click and do and "edit row" you will see the attributes that you can set for output.

Posted: Tue Aug 29, 2006 4:45 am
by Vijay Kumar
Do I need to set Is NullFieldValue=NULL in this case under the Edit Window??
If yes, then what is the use of NULLABLE field property??? Is it not sufficient if we define the NULLABLE property to 'Yes'

Thanks & Regards,
vijay

Posted: Tue Aug 29, 2006 5:42 am
by ArndW
No, for PX writes to sequential files it is not sufficient to just state the nullability as "Yes", you need to set the properties. What have you tried?

Posted: Tue Aug 29, 2006 5:51 am
by ray.wurlod
There is no such thing as NULL in a text file - there is only text.

You use the Null Field Value property to specify how you want NULL to be represented when writing to the file. This can be any string you like in a delimited file, but must be of the correct width in a fixed-width format file.

Posted: Tue Aug 29, 2006 6:22 am
by kumar_s
Server editon Sequential file is more polite in accepting the nulls when it has delimiter.

Posted: Tue Aug 29, 2006 6:48 am
by Vijay Kumar
Hi Ray,
In my job I want to extract data from Oracle database using Oracle Enterprise Stage to a Sequential File.
I don't want to replace the NULL values in output file, so I did a direct mapping with out any Null handling or transformations.
But when I run the job the job log shows many warning message.

Is there any way I can avoid these warning messages without doing any transformation for null handling?

Thanks & Regards,
Vijay

Posted: Tue Aug 29, 2006 7:07 am
by kumar_s
If you are bothered about additional overhead, use message handler, else use NVL in the database stage to convert the null to a value and nullableFieldValue to convert back the specified value to null.

Posted: Tue Aug 29, 2006 10:40 pm
by ray.wurlod
Vijay Kumar wrote:Is there any way I can avoid these warning messages without doing any transformation for null handling?
No. The warning messages will always be generated in this case, because you need to be aware of the situation.

Either provide null handling or implement a message handler.