Page 1 of 1

Date Column in Lookup stage

Posted: Mon Apr 20, 2009 3:03 am
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

Re: Date Column in Lookup stage

Posted: Mon Apr 20, 2009 4:08 am
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.