Date Column in Lookup stage

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
ethanr
Participant
Posts: 23
Joined: Fri Apr 11, 2008 9:37 am
Location: Delhi

Date Column in Lookup stage

Post by ethanr »

Hi

I am using Teradata stage as reference data for a Lookup stage. After key lookup between primary and referece stage, column extracted is DATE datatype.
Problem
--------
If lookup fails then, output DATE column is populating default date as "0001-01-01"

Is that how the stage behaves for date columns ?
How to populate NULL values

ETHAN
Thanks, EthanR
ShaneMuir
Premium Member
Premium Member
Posts: 508
Joined: Tue Jun 15, 2004 5:00 am
Location: London

Re: Date Column in Lookup stage

Post by ShaneMuir »

ethanr wrote:Hi

I am using Teradata stage as reference data for a Lookup stage. After key lookup between primary and referece stage, column extracted is DATE datatype.
Problem
--------
If lookup fails then, output DATE column is populating default date as "0001-01-01"

Is that how the stage behaves for date columns ?
How to populate NULL values

ETHAN
If it is populating the field on output then your field must be set to non-nullable. As a result when there is no value found on the lookup it will provide the default value (which for a date is 0001-01-01 - although i think you can specify your own value?). If you set your field to nullable then you should get a null value in your output column.
Post Reply