Transformer not able to handle NULL

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
anugrah86
Participant
Posts: 5
Joined: Fri Feb 08, 2008 7:35 am
Location: India

Transformer not able to handle NULL

Post by anugrah86 »

Hi,

I am having a Parallel job with Two Oci source tables. With one as primary table and other as reference table for lookup using a lookup stage.

After this lookup, i am checking if a column is coming NULL or not in a transformer stage by applying a IsNull constraint on it.

But the transformer is not restricting records with NULL values. It is allowing all records to pass through it.

Thanks!!
[/img]
~Anugrah
"Good Better Best. Don't take rest until Good becomes Better and Better becomes Best!!"
senthilt1
Participant
Posts: 134
Joined: Mon Nov 19, 2007 2:17 am

Post by senthilt1 »

Hi Anurag,

I am not sure whether this is the correct one..try this..

If you are checking isnull constraints in transformer for the fields that are from lookup table...then see whether it is a nullable field..if not then the is null constraints wont restrict the records...
normally we get null values for unmatched records...provided the field should be nullable, else it may give value as per the datatype. for varchar ""(empty string) and for numerics 0.

Thanks,

Senthil Kumar P[/b]
mk_ds09
Participant
Posts: 72
Joined: Sun Jan 25, 2009 4:50 pm
Location: Pune

Post by mk_ds09 »

Hi..

What is the datatype of the field that you are checking for..

And if it is passing through not null constraint, it seems there might be some not null values can be there in the field..may be spaces..

worth checking i guess !
-----------------------------------
Regards
MK

What would you attempt to do if you knew you could not fail?

-----------------------------------
anugrah86
Participant
Posts: 5
Joined: Fri Feb 08, 2008 7:35 am
Location: India

was getting

Post by anugrah86 »

Yes senthil,

I have checked the data by applying a peek stage, it was throwing empty string for character type field and it was able to pass IsNull constraint.


To remove it, I made the lookup key NULLABLE. By doing so, it started allowing NULL values which were later handled by transformer constraints.


Thanks Senthil and MK for help!!

Issue is fixed now.
~Anugrah
"Good Better Best. Don't take rest until Good becomes Better and Better becomes Best!!"
maplelin1
Participant
Posts: 2
Joined: Wed Feb 04, 2009 2:05 am

Re: Transformer not able to handle NULL

Post by maplelin1 »

Maybe your constraint expression is not right, if you want transform stage restrict record with null value, you may write constraint expression like this:
Not(isNull(DSLink15.SexName))

So if DSLink15.SexName is null, the record would be rejected.
Post Reply