Assignment of a NULL value to a NOT NULL column

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
sreddy
Participant
Posts: 144
Joined: Sun Oct 21, 2007 9:13 am

Assignment of a NULL value to a NOT NULL column

Post by sreddy »

Hi

I am getting this warning.

Assignment of a NULL value to a NOT NULL column "TBSPACEID=3, TABLEID=9, COLNO=94" is not allowed. SQLSTATE=23502

Please respond with useful information.

Thanks
SReddy
Sreedhar
Participant
Posts: 187
Joined: Mon Oct 30, 2006 12:16 am

Post by Sreedhar »

The error message says

"Assignment of a NULL value to a NOT NULL column "

So that is your clue...
Regards,
Shree
785-816-0728
sreddy
Participant
Posts: 144
Joined: Sun Oct 21, 2007 9:13 am

Post by sreddy »

In my job some of the source columns ( NULL) are mapped with Not Null columns in the target , while inserting the data. I am getting the warnings.


how can i avoid these warnings.
Sreedhar
Participant
Posts: 187
Joined: Mon Oct 30, 2006 12:16 am

Post by Sreedhar »

Populate Default values (Ask your Business) like Spaces or Default Dates. Which ever are applicable?
Regards,
Shree
785-816-0728
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

If you use a Transformer to map a NULLABLE column to a NOT NULL column and then use the NULLTOVALUE function to choose a default value when a null value is found it should remove the warning messages.

It you are completely sure your NULLABLE fields hold no NULL values and never will hold a NULL value you can demote the warning message to an information message by using a message handler that runs the demotion for just those jobs that are identified as being safe. This can be risky because unhandled NULLs can result in the entire row being dropped or a job abort.
sreddy
Participant
Posts: 144
Joined: Sun Oct 21, 2007 9:13 am

Post by sreddy »

Thank you for All

I fixed this issue.
agpt
Participant
Posts: 151
Joined: Sun May 16, 2010 12:53 am

Post by agpt »

sreddy wrote:Thank you for All

I fixed this issue.
Please specify the approach which you used exactly and mark the topic as resolved. :)
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Probably stopped mapping nullable columns to non-nullable targets.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply