Insertion of NULL values in Oracle table using OCI stage

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
abhishekachrekar
Participant
Posts: 45
Joined: Wed May 02, 2007 8:30 am
Location: Prague, Czech Republic

Insertion of NULL values in Oracle table using OCI stage

Post by abhishekachrekar »

Hi,

We are loading some data in Oracle table using Oracle OCI stage in Server Jobs.
The Input has has NULL values in one of the date fields.
While loading the data it gives warning message as shown below per record having NULL value as date.

Test_MDM1..Transformer_15: At row 1, link "Eff_Date", while processing column "EFF_DT"
Value treated as NULL
Attempt to convert String value "" to Date type unsuccessful


The Director Log gets dumped with all these warning messages and the job aborts after 50 messages. Data is loaded fine when run with unlimited warnings.

Can anyone suggest some steps to remove this warning?

Regards,
Abhishek
Regards,
Abhishek
gateleys
Premium Member
Premium Member
Posts: 992
Joined: Mon Aug 08, 2005 5:08 pm
Location: USA

Re: Insertion of NULL values in Oracle table using OCI stage

Post by gateleys »

You may wanna insert dummy date (9999/12/31 23:59:59) for any such dates.
gateleys
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Or actually supply a NULL value - "" is an empty string, not a NULL.
-craig

"You can never have too many knives" -- Logan Nine Fingers
abhishekachrekar
Participant
Posts: 45
Joined: Wed May 02, 2007 8:30 am
Location: Prague, Czech Republic

Post by abhishekachrekar »

i tried doing null handling and passed "" for null records but again it gave the same warning.

The record gets inserted throught the Oracle client.

Also the same data file was loaded without any warnings with Oracle Enterprise, ODBC Enterprise (both in Parallel) and ODBC stage in SErver.

Only Oracle OCI stage is throwing this warning.
Regards,
Abhishek
gateleys
Premium Member
Premium Member
Posts: 992
Joined: Mon Aug 08, 2005 5:08 pm
Location: USA

Post by gateleys »

abhishekachrekar wrote:i tried doing null handling and passed "" for null records but again it gave the same warning.
Do NOT pass "" (Empty string) to the null date. Rather, pass the constant @NULL. An empty string is NOT a Null, dear friend.
gateleys
Post Reply