Router node
The Router node routes each input row to one of N output ports based on rule matches. Think of it as a multi-way switch over the row content: for each row, the runtime picks the first matching route and emits the row there.
When to use
- The row's downstream fate depends on a categorical value (
event_type,severity,region) and you want distinct branches per value. - You want more than two branches — otherwise use Branch's two-way split.
- The rules are declarative and static; for dynamic routing, use Loop + Filter combinations instead.
Ports
| Port | Direction | Kind | Notes |
|---|---|---|---|
in | in | data | Rows to route. |
<routeId> | out | data | One dynamic output port per configured route. |
default | out | data | Rows that matched no route (when the default route is enabled). |
error | out | control | Fires when a rule expression throws. |
notify | out | control | Notification policy port. |
Configuration
- Routes. Ordered list of
{ id, label, rule }. Eachruleis either a Filter-style rules group (structured) or a raw expression. - Show route labels. When on, the canvas prints the route label next to each output port so the graph is self-documenting.
- Fall-through mode.
first-match(default) — the row is emitted on the first matching route.every-match— the row is emitted on every matching route. Rare; useful for auditing branches.
- Default route. When enabled, unmatched rows fire on the
defaultport; when disabled, unmatched rows are silently dropped.
Configure Action walkthrough
- Add a route with the + button. Each route has a name, a label, and a rule.
- Configure each rule with the same Filter Rules / Expression toggle Filter uses.
- Toggle Show route labels for a self-documenting canvas.
Runtime behaviour
- For each row, rules are evaluated in configuration order until the first match (or all matches in
every-matchmode). Falls through todefaultif enabled, else dropped. - Rule expressions run via
evalTransformExpr.
Failure modes
- Rule error on a row. Row routes to
error; the run continues.