Page 1 of 1

Using 'otherwise' in a transformer

Posted: Mon Feb 02, 2009 4:36 am
by PilotBaha
I have been using 'otherwise' to capture the records that don't meet the criteria in a transformer for so many years. Just today found out that some records that should meet the requirement are being captured by 'otherwise' link on a Transformer. I displayed every single criteria in the output files and I still couldn't believe my eyes that 'otherwise' had some data that should have gone the other way.
Even using stage variable didn't solve the problem until I explicitly typed
StageVar = 0 in the contraint section of the former 'otherwise' link.

Am I missing something?

Posted: Mon Feb 02, 2009 6:58 am
by Sainath.Srinivasan
Check link order

Re: Using 'otherwise' in a transformer

Posted: Mon Feb 02, 2009 6:58 am
by tjr
What exactly were your constraints previously?
Remember that StageVar = 0 is in some cases equal to not(StageVar)...

Posted: Mon Feb 02, 2009 7:39 am
by mk_ds09
Can you check the data which you think that could have gone the other way...!

If the data is present on both links then you can say that there is issue with the other way...and it is only in the 'Otherwise'..it cleary failing some criteria to go in the first link..

---------------------

Hope this helps..

-------------------

MK

Posted: Mon Feb 02, 2009 3:19 pm
by ray.wurlod
What is the data type of the stage variable? Remember that parallel jobs are strongly typed. One result of this is that any constraint expression must evaluate to a true/false value; the old server way of thinking (0 is false, anything else is true) does not apply here.

Posted: Tue Feb 03, 2009 3:50 am
by dr.murthy
Sainath.Srinivasan wrote:Check link order

The other wis link always be last order,if at all not in that case there is a chance to get some additonal records