Page 1 of 1

Warning message about nullable source

Posted: Thu Nov 06, 2003 11:42 am
by roshanp_21
Converting nullable source to non-nullable result. Tired chaning all the columns to nullable still did not work.

Posted: Thu Nov 06, 2003 12:01 pm
by kcbland

Code: Select all

Tired chaning all the columns to nullable still did not work.
How did you do this :?: :?: :?:


If you have a source column of data that has a NULL value, and you want to put it into a target column that does not accept NULLs, you must supply a value.

Please post the error message to help.

Re: Warning message about nullable source

Posted: Thu Nov 06, 2003 1:56 pm
by Teej
roshanp_21 wrote:Converting nullable source to non-nullable result. Tired chaning all the columns to nullable still did not work.
Insert copy stages between each stage. This is well known with Oracle, but may be an issue with DB2 where they would explicitly ignore the defined metadata and throw whatever the database tells it to set the fields as.

Also, you probably was a victim of column propagation too, especially if you are outputting a field that have the nullability changed on the output tables. Turn it off on the job level.

-T.J.

Posted: Sat Nov 08, 2003 12:22 pm
by roy
Hi,
I had some cases where an empty string wouldn't go into a table.
In this case I simply replaced it with a @NULL or a space or zero depending what I needed.

I guess this might be driver related or something similar.

IHTH

Posted: Sun Nov 09, 2003 1:34 pm
by Teej
roy wrote:I guess this might be driver related or something similar.
Sorta. DataStage have a separate indicator to determine whether a column is NULL or not. You can't just give it an empty string. You have to explicitly ensure that it is NULL.

The database stages (at least Oracle does this) utilizes that particular indicator to say, "Oh, this is NULL. Hey Oracle, here's a NULL."

That is also why you can't do a "If string = "" Then..." inside the transform stage at least for PX (The Transform stage will drop the record, since it's NULL, and you don't handle it properly). You have to use If IsNull() ... check.

-T.J.

Posted: Tue Feb 24, 2004 6:59 pm
by sim
Hi,
I tried to extract data from a table (Oracle 9i) which has null values in Coulmn3. My job is like this: Oracle Stage --> Transformer --> Seq. File. When I run this job, I get error like this :'cannot export null field with out null handle'. I incorporated 'If then else' in transformer to check for Null in Column3, but still I get same error. Where & How should I handle Null? I want to do straight dump, i.e. I want to get all the data from the Oracle table to the Seq. file including null. Thanks.

Posted: Wed Feb 25, 2004 1:24 am
by roy
Hi,
Welcome aboard :),
unfortunatly I have Oracel 8 no access to 9 :( but I never heard of this error you describe :shock: .

I hope others can give you dome help,

Posted: Wed Feb 25, 2004 7:40 am
by chulett
This is another reason for not posted at the end of a months dead thread. Sim, we don't know anything about your environment - Windows or UNIX? Version of DataStage? What kind of Sequential file - delimited or fixed? That kind of information at a minimum might help get you more useful answers.

Problem is what you are doing should be very straight-forward. When you are doing a 'dump' from Oracle to a flat file, nulls (in and of themselves) should not be an issue, the flat file isn't typically going to care about them. I've been working with DataStage and Oracle since 3.1 and 7.3 and I've never seen that particular error message either.

:idea: Suggestion - why don't you start a new thread, give us all your particulars and as much information about your job as possible (like your exact 'if then else' logic you mentioned, for example) and we'll see if we can get you straigthened out?

Posted: Wed Feb 25, 2004 7:00 pm
by Jay
hi guyz

i had the exact same error today....source is DB2 table...we are simply sending the data to a sequential file in DS PX 7.0...we are trying to get a grasp of the system now...

what Teej told is also true...column propagatioin is enabled...so i'll try removing it at the job stage...lets see if i can see some light on the morrow...lol...

thanks again all
(this forum is rocking for me)
jay

Posted: Wed Feb 25, 2004 7:46 pm
by sim
Hi Chulett:
I'll post my error message with more details in a seperate thread soon (I want to try couple of things tomorrow before I post). Thanks.