Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


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. Filter

The 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 OverviewUnderstanding Expressions in SnapLogic.


Prerequisites:

[None]


Support and limitations:

Works in Ultra Task Pipelines.

Account: 

Accounts are not used with this Snap.


Views:


InputThis Snap has exactly one document input view.
OutputThis Snap has at least two document output views.
Error

This Snap has at most one document error view and produces zero or more documents in the view.
Note: Error view is not supported in Spark mode.


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.
Note: If ANY route contains an expression, then only those with expressions are evaluated; those routes without an expression will evaluate to false.

Example:

  • $first_name == "Joe"
  • $people[0].age > 15
  • startsWith($description, "Snap") && $quantity < 100

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.
Example

Expression | OutputView Name

$quantity > 10 | output1

$quantity <=10 | output2 

Default value: [None]


Multiexcerpt include macro
nameSnap Execution
pageAnaplan Read


Multiexcerpt include macro
nameSnap_Execution_Introduced
pageAnaplan Read

Example


Excerpt Include
Flow Snap Pack
Flow Snap Pack
nopaneltrue