Input Router

Modified on Mon, 22 Sep at 4:29 PM

Summary

The Input Router block conditionally selects one of several connected inputs and routes its entire dataset to the single output. It is essentially the reverse of the Output Router: instead of routing one dataset into multiple possible outputs, the Input Router takes multiple possible inputs and routes only one of them to its output.

The decision is made by evaluating a formula on the test input (mandatory). The formula must return an integer ≥ 1, which selects which of the connected inputs is routed to the output.



How does it work?

  • test (mandatory) — connect a dataset here. The formula is evaluated once on the complete dataset provided to test.
  • other inputs (optional, multiple) — connect as many additional inputs as required. These are the candidate datasets that may be routed to the output.
  • Formula — configured in the block options. Must return an integer value 123, … corresponding to one of the connected inputs.

The input chosen by the formula is passed through to the single output. All other inputs are halted and not executed.


Options

Formula

Enter a single expression that is evaluated once on the complete test dataset. The expression must evaluate to an integer ≥ 1, which selects the corresponding input.

Use Omniscope’s aggregate and SUBSET functions to compute dataset-level statistics or to evaluate conditions on specific subsets.


Example 1 — Select input by region total sales

Suppose you have 3 candidate input datasets connected. You want to route input 1 if Region A sales are small, input 2 if medium, and input 3 if large. The formula could be:

IF( SUBSET_SUM([Sales], SUBSET([Region], "Region A", "=")) <= 100000, 1, IF( SUBSET_SUM([Sales], SUBSET([Region], "Region A", "=")) <= 500000, 2, 3 ) )

  • Input 1 is routed if Region A sales ≤ 100,000
  • Input 2 is routed if Region A sales > 100,000 and ≤ 500,000
  • Input 3 is routed if Region A sales > 500,000


Example 2 — Select input by mean sales

Route input 1 if company-wide average sales are below 100,000, otherwise route input 2:

IF( SUBSET_MEAN([Sales]) < 100000, 1, 2 )


Output

  • Output — receives the dataset from the selected input (the one chosen by the formula).
  • All other inputs are halted, meaning their upstream workflows are not executed and produce no side effects.


Examples summary

  • Connect as many input datasets as required.
  • Use the test dataset to evaluate a formula that decides which input index (1, 2, 3, …) to route.
  • The selected input’s dataset is routed to the output.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article