Page 1 of 1

Transformer not able to handle NULL

Posted: Tue Feb 03, 2009 11:58 pm
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]

Posted: Wed Feb 04, 2009 12:45 am
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]

Posted: Wed Feb 04, 2009 2:44 am
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 !

was getting

Posted: Wed Feb 04, 2009 2:57 am
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.

Re: Transformer not able to handle NULL

Posted: Wed Feb 04, 2009 4:38 am
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.