Router not routing?

I have a simple pipeline where I’m using Router to decide if an oracle procedure should be called. Even if I just set the router expression to false for the output0 view, the output0 snap (the oracle procedure), is still being executed. I’ve tried resetting my workspace. Is this a bug?

I can’t replicate it. Can you please add more details on your router expression. Thanks.

I’m using false for output0 and true for output1

It appears to be the combination of the router and a gate snap. The gate snap, and the snaps after it, are being executed even if the router condition is not met.

It would help to see more details about your pipeline. Does your Oracle snap actually need input? If not, the fact that no data will be routed to it won’t prevent it from executing.

@wpenfold, Per the gate snap documentation the gate snap will always produce an output document, even if input is empty. For these types of situations, it suggests following it with a filter snap with the expression !$.isEmpty().

Thanks, I’ll do that…any insight into why the gate snap is being executed if the router condition is not met?

Regardless of the number input documents received by the gate snap, it will always produce a single output document.

I wonder if if might be a good idea to have a future version of the Gate snap include something similar to the image flag like the formatter snaps - giving pipeline developers the optional behavior.

1 Like