Function in Trf stage to drop nulls in 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
ravij
Premium Member
Premium Member
Posts: 170
Joined: Mon Oct 10, 2005 7:04 am
Location: India

Function in Trf stage to drop nulls in Date column

Post by ravij »

Hi All,

I have a job in which I have a DATE column which is NULL in source and NOT NULL in target. If my source value for date column is NULL, it don't want to reject that valule in trf stage.
I tried with couple of functions like IsNotNull or NullToEmptyu but not working.
Please provide if any funtion is available in Trf stage.
My job design is : Oradb-->Trf-->Oradb
I searched in forum, but couldn't find required solution.
Please help in resolving this issue.
Thanks in advance,
Ravi
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

First you have to decide what exactly it is you want in the DATE field when it is null in the source - some kind of in-band "null" value like 12/31/9999 perhaps?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ravij
Premium Member
Premium Member
Posts: 170
Joined: Mon Oct 10, 2005 7:04 am
Location: India

Post by ravij »

chulett wrote:First you have to decide what exactly it is you want in the DATE field when it is null in the source - some kind of in-band "null" value like 12/31/9999 perhaps? ...
Hi Chulett, Thanks for your quick response.

I don't need that record which the Date field is having null value(or no value) in source, just want to discard it.
Ravi
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Re: Function in Trf stage to drop nulls in Date column

Post by kris007 »

ravij wrote: If my source value for date column is NULL, it don't want to reject that valule in trf stage.
You mentioned that you don't want to reject it and again
I don't need that record which the Date field is having null value(or no value) in source, just want to discard it.
Assuming you want to discard it, you can use IsNotNull(DATE) in the Transformer as a Constraint.
Kris

Where's the "Any" key?-Homer Simpson
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Right, my answer was predicated on the fact that you specifically said you did not want to reject it. As noted, all you need is a constraint.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply