Page 1 of 1

switch stage, case expressions

Posted: Wed Feb 17, 2010 6:25 pm
by dsguyok
Hi

Is it possible to implement the following in the Switch stage:

If the selector value is 2914, then send the row to link 0.
If the selector value is 2915, then send the row to link 1.
By default (ie anything else), send the row to link 2 which IS NOT a reject link.


Basically I don't want unhandled values to be sent to a reject link. So far I can only implement the first 2 parts using case statements.

Can this be done using the Switch stage?

Posted: Wed Feb 17, 2010 7:54 pm
by ray.wurlod
There's no "otherwise" capability in the Switch stage.

However, there's nothing special about a reject link except that you can't work with the Mappings (and it causes a message to be logged if it's used). You can set the If Not Found property to Output and direct these rows to the reject link.

If you don't want to do that you'll need to investigate the Filter stage (or Transformer stage) instead.