Null handling with Date 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
joesat
Participant
Posts: 93
Joined: Wed Jun 20, 2007 2:12 am

Null handling with Date column

Post by joesat »

Hi,
I am trying to redesign a Cosort program into PX. Right now I am checking out the metadata details. The input file has a date column which can have null values.
As reported in different topics in this forum, I set the metadata as Date(10) with Nullable property to 'Yes' and the Null Field Value to a default value (9999-12-31). In spite of doing this, the records with null values for this field are getting rejected.
I changed the datatype to Varchar and then the record is retained. Why is it not accepting Date with Null values?

I have also tried other options like setting the Default property and Format string. Yet the problem still persists. Any inputs will be appreciated greatly.
Joel Satire
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

What happens when you just specify a nullable column and set none of the optional attributes?
joesat
Participant
Posts: 93
Joined: Wed Jun 20, 2007 2:12 am

Post by joesat »

If I use it as you say I get the following warning for each record of the input,
When checking operator: When validating export schema: At field "DATE_COLUMN": Exporting nullable field without null handling properties
Joel Satire
joesat
Participant
Posts: 93
Joined: Wed Jun 20, 2007 2:12 am

Post by joesat »

If I use it as you say I get the following warning for each record of the input,
When checking operator: When validating export schema: At field "DATE_COLUMN": Exporting nullable field without null handling properties
Joel Satire
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Ahh, I neglected to think about the inability to write nulls to a sequential file. If you change the date output to 9999-12-31 (are you 100% that is your correct default date format?) and check the output file, do you have 9999-12-31 in that column?
Post Reply