Snap type: | Flow | |||||||
---|---|---|---|---|---|---|---|---|
Description: | This Snap routes documents to output views matching a boolean expression. If no expressions are specified, documents will be evenly distributed across all output views. Multiple views are added to the router through the Views tab. When entering in an output view name and clicking Apply Changes, output view links will be attached to the router in order they are declared. Router vs. FilterThe Router and Filter Snaps are similar, but the Filter Snap only handles a single stream. The Router Snap is designed to handle multiple output views. Expression functions can be found at Expression Language Overview. | |||||||
Prerequisites: | [None] | |||||||
Support and limitations: |
| |||||||
Account: | Accounts are not used with this Snap. | |||||||
Views: |
| |||||||
Settings | ||||||||
Label | Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline. | |||||||
Routes | Expression to evaluate and output views to write a document if the expression evaluates to true. The list of expressions can be seen here. When there are no routes defined, this Snap will be in auto-routing mode. In this mode, this Snap works like a load balancer; incoming documents will be forked evenly across all output views, in an alphabetically-ordered, round-robin fashion. Example:
Default value: [None] | |||||||
First Match | If true, then the first output view whose corresponding expression evaluates to true will only have the document written to it even if there are other matches. If false, then all output views whose corresponding expression evaluates to true will have the document written to it. Expression | OutputView Name $quantity > 10 | output1 $quantity <=10 | output2 Default value: [None] |
Examples
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|