Warning message about nullable source

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
roshanp_21
Participant
Posts: 5
Joined: Tue Oct 07, 2003 8:20 am
Location: USA

Warning message about nullable source

Post by roshanp_21 »

Converting nullable source to non-nullable result. Tired chaning all the columns to nullable still did not work.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post 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.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Teej
Participant
Posts: 677
Joined: Fri Aug 08, 2003 9:26 am
Location: USA

Re: Warning message about nullable source

Post 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.
Developer of DataStage Parallel Engine (Orchestrate).
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post 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
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
Teej
Participant
Posts: 677
Joined: Fri Aug 08, 2003 9:26 am
Location: USA

Post 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.
Developer of DataStage Parallel Engine (Orchestrate).
sim
Participant
Posts: 13
Joined: Wed Feb 18, 2004 6:20 pm

Post 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.
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post 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,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Jay
Participant
Posts: 105
Joined: Tue Nov 11, 2003 8:28 pm

Post 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
sim
Participant
Posts: 13
Joined: Wed Feb 18, 2004 6:20 pm

Post 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.
Post Reply