Versions Compared

Key

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


Snap type:

Read


Description:

This Snap forces a pipeline to stop with a failed status if it receives more records than the user-defined threshold.


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 most one document output view.
ErrorNo error view is defined for this Snap. Nothing is written to the error view in this Snap. The Snap must let the pipeline fail if it receives more than the number of records required.


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.

Threshold limit



Required. The maximum number of input records to be received by the Snap.
Note: Though it is an expression property, it cannot take values from upstream Snaps. Only direct values or pipeline parameters are allowed.

Example: 10

Default value: 0


Exit error message


The message to be displayed when the error occurs.
Note: This is an expression property. In case the property value is blank, the default value message is shown for a better user experience.

Default value:  Exceeded threshold limit

Multiexcerpt include macro
nameSnap Execution
pageAnaplan Read


Multiexcerpt include macro
nameSnap_Execution_Introduced
pageAnaplan Read

Examples

Write up to Three Input Documents into SLDB and Reject All Additional Documents

In this example, you have a list of documents, and you want to filter the first six input documents based on the number they contain in a specific field. You want all odd numbers routed into one branch, and all the even numbers, into another. To do so, you create a parent and child Pipeline.

  • The parent Pipeline accepts multiple documents and triggers the child Pipeline for each document.
  • The child Pipeline routes incoming documents into two branches based on their contents. It then accepts only the first three documents in each branch and generates an error for each additional document.

Download these Pipelines

The Child Pipeline

You first design the child Pipeline.

  1. Add a Router Snap to the Pipeline and configure it to route all documents containing even numbers in the $num field into a branch labeled Even, and all documents containing odd numbers into a branch labeled Odd.


  2. Add an Exit Snap to each output view of the Router Snap and configure them both to pass three documents and throw an error when they receive more than three documents. Also, add an output view to each Exit Snap, so you can view the documents that were passed.


  3. Add a JSON Formatter Snap to the output view of each Exit Snap to convert the Exit Snap's output documents into a binary stream of data.

  4. Add a File Writer Snap to the output view of each JSON Formatter Snap and configure each to write out the data received as JSON files in SLDB. 
     

The Parent Pipeline

Design the parent Pipeline to accept multiple documents and trigger one child Pipeline execution for all the input documents, together.

  1. Add a JSON Generator Snap to the Pipeline and configure it send seven documents, in three of which the $num field contains even numbers. In the four remaining documents, $num contains odd numbers.


  2. Add a Pipeline Execute Snap to the Pipeline and configure it to execute the child Pipeline once for the entire collection of documents received from the JSON Generator Snap. To do so, select the Reuse executions to process documents check box. If you do not select this check box, then the child Pipeline will be executed once for each document coming in, and the Exit Snap will always receive only one document and never throw an error. For details on configuring the Pipeline Execute Snap, see Pipeline Execute.


  3. Save and execute the parent Pipeline. 
    1. The Pipeline Execute Snap sends all seven documents together to the child Pipeline for processing.
    2. The Router Snap routes the incoming documents into two branches, Even and Odd.
    3. The Exit Snap attached to the Even branch offers all three documents as output and does not throw any error.
    4. The Exit Snap attached to the Odd branch offers all three documents as output. It also sends an error back to the Pipeline Execute Snap, which triggered the child Pipeline.


    5. The two File Writer Snaps create two documents, Evens.JSON and Odds.JSON, in SLDB, each containing three documents.
       

Download these Pipelines

Downloads

Attachments
patterns*.slp, *.zip


Insert excerpt
Flow Snap Pack
Flow Snap Pack
nopaneltrue