Router node
What it does
The Router node sends each row to one route port, R1 to R5, chosen by the row's content. A row that matches no route leaves on DEFAULT. No row is dropped.
When to use
- What happens to a row depends on a category, such as
event_type,severityorregion. - You need three or more destinations. For a two-way split, a Filter gives KEPT and DROP.
Configure
Select the node and press Configure to open Configure Router. Choose a Routing Mode.
Save and Done stay unavailable while a required setting is missing. Cancel discards the changes made since the dialog opened or was last saved. A message confirms each save.
Key Routing (default): one column or expression decides the route.
- Route By: the Field to compare, such as
REGION, or an expression, such asUPPER(REGION). A saved field the input does not have shows as not in input. Choose another field, or Choose a field to clear it. - Route Values: one value per route, such as
Easton R1 andWeston R2. A row goes to the first route whose value equals the field's or expression's value. A route left blank is unused.- Add Route adds a route on the lowest free port, up to five.
- Remove deletes a route and the edge on its port.
A new Router starts with no field and one empty route on R1. The run preflight stops a run until the Router has a field and a route value.
Rule Routing (First Match): an ordered list of rules. Each rule has a Route, a Field, an Operator and a Value. Rules are checked from the top, and the first match wins. Up and Down change the order. Each rule names its own field, so Route By is not used.
Match Settings
- Match case: off by default, so
Eastandeastmatch. - Show route values on edges: on by default. In Key Routing, a route's port and edges show its value, such as
East, instead ofRoute 1.
Route By and each rule's Field have an fx button for an expression, such as UPPER(region). The editor has the function library, the upstream fields and live checking. The expression is evaluated for each row, and its result is compared with the route values, or with the rule's value, under the same Match case setting. An expression over a column the row does not have gives an empty value, so the row goes to DEFAULT.
Ports
| Port | Direction | Kind | Notes |
|---|---|---|---|
in | in | data | Rows to route. |
r1 ... r5 | out | data | The route ports. Each one is a destination with a value or a rule. |
out | out | data | DEFAULT: rows that matched no route. |
error | out | control | Receives the input rows when the node fails, including when an expression cannot be evaluated. |
The card shows only configured routes: a route with a port and a value, or in Rule Routing, a rule with a route and a field. DEFAULT is always shown, with a grey dot, and is named Default. Removing a route deletes the edge on its port.
Before a run
The run preflight stops a run when the Router cannot route anything:
- Key Routing needs a Route By field and at least one route with a value.
- Rule Routing needs at least one rule with a field and a route.
A route with a port and no value, or a value and no port, is ignored.
Examples
Route by region. Key Routing on REGION: R1 East, R2 West, R3 Central. Each route port feeds its own Transform and Load. DEFAULT goes to a Notification so unknown regions are noticed.
Route by severity. Rule Routing: R1 when severity Equals critical, R2 when amount Greater Than 10000, R3 when country In List US, CA. A critical row with a large amount goes to R1, the first match.
Troubleshooting
| Symptom | Cause | What to do |
|---|---|---|
| Every row leaves on DEFAULT | The field is wrong, or values differ in case or spaces. | Check the Route By field, turn off Match case, or use fx with TRIM(...). |
| A route port is not on the card | The route has no value, or the rule has no field. | Complete the route. |
| A row goes to the wrong route | An earlier rule also matched. | Move the more specific rule up. |
| The run will not start | The Router has no field, or no route has a value. | Add a Route By field and a value, or a rule. |