Data Load to Oracle Table

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
kittu.raja
Premium Member
Premium Member
Posts: 175
Joined: Tue Oct 14, 2008 1:48 pm

Data Load to Oracle Table

Post by kittu.raja »

Hi,

I have 10 columns loading into Oracle Table, but one of the column I have hard coded as space as per requirement but Oracle is treating that column as NULL and I am not able to load the data. All my data is getting rejected.

I used Oracle Preserve Blanks ENV variable but still I am unable to load the data.

Can anyone help me out.

Thanks,
Rajesh Kumar
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Show us the full name of the environment variable you set and what exactly it was you set it to.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kittu.raja
Premium Member
Premium Member
Posts: 175
Joined: Tue Oct 14, 2008 1:48 pm

Post by kittu.raja »

chulett wrote:Show us the full name of the environment variable you set and what exactly it was you set it to.
Hi Chullet,

I used APT_ORACLE_PRESERVE_BLANKS and it is set to true.
Rajesh Kumar
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So, that part should be fine, so now we just need the gory details of what it is you are doing and seeing. How is this mysterious column defined, both in the job and in the target - data type, size/precision, nullability, etc? What error messages are you seeing in the log? Post them here unedited if you do rather than the 'something like this' that we get on occassion. Also let us know what the heck you mean by the very generic term 'load' - what stage are you using? What Write Method, etc, etc... et cetera.

:idea: Since we're on the other side of the Looking Glass and can't see what you are doing, you need to be as complete as possible in your problem statement, otherwise people have to guess, and I'm way too old to waste my time guessing. Especially on a Sunday.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kittu.raja
Premium Member
Premium Member
Posts: 175
Joined: Tue Oct 14, 2008 1:48 pm

Post by kittu.raja »

[quote="chulett"]So, that part should be fine, so now we just need the gory details of what it is you are doing and seeing. How is this mysterious column defined, both in the job and in the target - data type, size/precision, nullability, etc? What error messages are you seeing in the log? Post them here unedited if you do rather than the 'something like this' that we get on occassion. Also let us know what the heck you mean by the very generic term 'load' - what stage are you using? What Write Method, etc, etc... et cetera.

The column name is Alloc_Ind and the data type is char and the length is 1, nullability is NOT NULL. The job is running fine with no warnings or errors but when I put a reject link for the Oracle Enterprize stage its giving me sql code as -1400. I am using upsert method.

Thanks,
Rajesh Kumar
sohasaid
Premium Member
Premium Member
Posts: 115
Joined: Tue May 20, 2008 3:02 am
Location: Cairo, Egypt

Post by sohasaid »

kittu.raja wrote: the Oracle Enterprize stage its giving me sql code as -1400. I am using upsert method.
I think you're trying to insert empty string '' not a space ' ' into Oracle. Because Ora-1400 means not able to insert null into not nullable column and Oracle treats the empty string as NULL.
Re-check your fixed string.

Regards.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Just to be pedantic, how exactly are you populating the ACCOL_IND field? Stage, derivation, etc.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kittu.raja
Premium Member
Premium Member
Posts: 175
Joined: Tue Oct 14, 2008 1:48 pm

Post by kittu.raja »

chulett wrote:Just to be pedantic, how exactly are you populating the ACCOL_IND field? Stage, derivation, etc.
In the derivation
Rajesh Kumar
kittu.raja
Premium Member
Premium Member
Posts: 175
Joined: Tue Oct 14, 2008 1:48 pm

Post by kittu.raja »

chulett wrote:Just to be pedantic, how exactly are you populating the ACCOL_IND field? Stage, derivation, etc.
In the derivation
Rajesh Kumar
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:? You must have missed the exactly part. What stage - transformer? And post your exact derivation so we can see what you are doing.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply