Versions Compared

Key

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

...

Snap type:

...

Read

 

...

Description:

...

In this article

Table of Contents

Overview

You can use this Snap to force a Pipeline to stop with a failed status if it receives more records than the user-defined threshold.

...

Snap Type

The Exit Snap is a Read-type Snap.

Prerequisites

...

...

[None]

 

...

...

Accounts are not used with this Snap.

 

...

None.

Limitations and Known Issues

None.

Support for Ultra Pipelines

Works in Ultra Tasks.

Info
titleBehavior of the Exit Snap in Ultra Pipelines

When an input document is passed to the Exit snap in an Ultra pipeline, the Snap acknowledges the message (removes it from the request queue) and fails the Pipeline (depending on the Threshold limit).

Snap Views

TypeFormatNumber of ViewsExamples of Upstream and Downstream Snaps
InputDocument
  • Min: 1
  • Max: 1

N/A

OutputDocument
  • Min: 0
  • Max: 1
N/A
ErrorNo error view is defined for this Snap. Nothing is written to the error view in this Snap. The Snap

...

fails the

...

Pipeline if it receives more than the required number of records

...

.

 

...

Settings

...

Label

 

...

Snap Settings


Field

Field Type

Description

Label*


Default Value
Exit
Example:
 Exit Transaction 

StringSpecify 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

...

 

...

*


Default Value
: 0
Example: 2483647



Integer/Expression

Specify the maximum number of input records to be received by the Snap.

...

Note

This field is expression enabled; however, it cannot take values from the upstream Snaps.

...

The Snap allows only direct values or

...

Pipeline parameters

...

.

...


Exit error message


Default

...

Value:

...

 

...

Exit error message

...

Exceeded threshold limit


String/Expression

Specify the message to be displayed when the error occurs.

Note

...

This field is

...

expression enabled; in case the

...

field is blank, the default value

...

Default value:  Exceeded threshold limit

...

is displayed.


Snap Execution


Default Value
Validate & Execute
Example
Execute only

Dropdown list

Select one of the three modes in which the Snap executes. Available options are:

  • Validate & Execute: Performs limited execution of the Snap, and generates a data preview during Pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during Pipeline runtime.

  • Execute only: Performs full execution of the Snap during Pipeline execution without generating preview data.

  • Disabled: Disables the Snap and all Snaps that are downstream from it.

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.

Image Added

  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.
    Image Added

  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.
    Image Added

  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. 
    Image Added Image Added

The Parent Pipeline

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

Image Added

  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.
    Image Added

  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.
    Image Added

  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.
      Image Added

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

Downloads

Multiexcerpt include macro
namedownload_instructions
pageOpenAPI

Attachments
patterns*.slp, *.zip


Insert excerpt
Flow Snap Pack
Flow Snap Pack
nopaneltrue