In this article
Table of Contents | ||
---|---|---|
minLevel | 1 | |
maxLevel | 2 | absoluteUrl | true
Table of Contents | ||
|
Overview
You can use this Snap to enable looping on pipeline executions based on a stopping stop condition or iteration limit. The output document of the Snap will be each iteration is fed into the next round of document input for execution iteration as the input document, and execution continues until the stop condition is met or the cutoff iteration limit is reached. Learn more.
...
Snap Type
The PipeLoop Snap is a Flow-type Snap.
Prerequisites
...
Child pipelines must have one input view and one output view.
Support for Ultra
...
Tasks
Does not work in support Ultra PipelinesTasks.
Limitations
Reuse is currently not supported because of needing the requirement to close an input view in order to force a flush of all documents out.Supports child pipelines with one open input view and one open output view.
Reads only the first output document for a given specific input document (the rest will be remaining documents are ignored and dropped).
Supports expressions on the pipeline specification, but it will only be evaluated on evaluates the input document to PipeLoop, not for each iteration.
Known Issues
None.
Snap Views
Type | Format | Number of Views | Examples of Upstream and Downstream Snaps | Description |
---|---|---|---|---|
Input |
|
|
| The document or binary data to send to the child pipeline. For a single document input, only the first output document is captured in the output document and the remaining documents are ignored. |
Output |
|
|
| If you select the Debug iterations output checkbox, an additional |
alongside the output documents and passthrough documents.
|
|
|
|
| ||||
Error | Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter when running the pipeline by choosing one of the following options from the When errors occur list under the Views tab:
Learn more about Error handling in |
Snap Settings
Info |
---|
Learn more about managing Filesthe icons in the Snap Settings dialog. |
Field Name | Field Type | Description | |
---|---|---|---|
Label*
Default Value: PipeLoop | String | Specify the name for the Snap. You can modify this to be more specific, especially if you have more than one of the same |
Snaps in your pipeline.
| |||
Pipeline*
Default Value: N/A | String/Expression | Specify the path of the pipeline to execute. | |
Pipeline Parameters | Use this field set to define child pipeline parameters to use for executing the pipeline. | ||
Parameter name Default Value: N/A | String/Suggestion | Specify |
the parameter's name. You can also select the Pipeline Parameters defined for the |
pipeline selected in the Pipeline field. | ||
Parameter value Default Value: N/A | String/Expression | Specify the value for thepipeline parameter, which can be an expression based on incoming documents or a constant. If you configure the value as an expression based on the input, then each incoming document or binary data is evaluated against that expression when invoking the pipeline. The result of the expression is JSON-encoded if it is not a string. The child |
pipeline then needs to use the |
. | |||
Loop options | Define the iteration configuration. | ||
Stop condition Default Value: N/A | String/Expression | Specify the condition to be evaluated during execution that decides whether the execution should stop or continue. |
The iteration continues until the stop condition is met or the iteration limit is reached. |
The Snap errors out if the Stop condition cannot be evaluated at run time. The stop condition is evaluated on the output document from each iteration. | |||
Iteration limit Default Value: 10 | Integer/Expression | Specify the maximum limit for the number of iterations to run to avoid infinite loops. | |
Debug iteration outputs Default Value: Deselected |
Checkbox | Select this checkbox to |
include the index, output document, and stop condition evaluation for |
each iteration as part of the output format.
| |||
Execution options | Define the child pipeline execution configuration. | ||
Execute on Default Value: LOCAL_NODE |
Dropdown list | Select |
one of the following Snaplex options to specify the target Snaplex for the child |
pipeline:
|
Snaplex path
Default Value: N/AExample:
String/Expression
Appears when you choose the SNAPLEX_WITH_PATH option.
Specify the Snaplex to execute on
| |||
Execution label Default Value: N/A | String/Expression | Specify the label to display in the Dashboard for the current execution. | |
Snap Execution Default Value: Validate & Execute |
Execute only | Dropdown list | Select one of the following three modes in which the Snap executes:
|
Execution flow of the PipeLoop Snap
The Snap follows the following procedure:
Passes input document to the child pipeline.
Executes the child pipeline.
Collects child pipeline output document.
Evaluates the stop condition based on the child pipeline output document.
If the stop condition is false, the Snap checks if the iteration limit is reached.
If the iteration limit is not reached, the Snap passes the output document to input (back to Step 1). The iteration stops if the stop condition is evaluated to true or the iteration limit is reached.
Troubleshooting
...
Error
...
Reason
...
Resolution
...
Account validation failed.
...
The Pipeline ended before the batch could complete execution due to a connection error.
...
Verify that the Refresh token field is configured to handle the inputs properly. If you are not sure when the input data is available, configure this field as zero to keep the connection always open.
Examples
Excluding Fields from the Input Data Stream
We can exclude the unrequired fields from the input data stream by omitting them in the Input schema fieldset. This example demonstrates how we can use the <Snap Name> to achieve this result:
<screenshot of Pipeline/Snap and description>
Download this Pipeline.
Downloads
Info |
---|
|
Attachments | ||||
---|---|---|---|---|
|
Snap Pack History
...
title | Click here to expand... |
---|
Example
Insert excerpt |
---|
|
|
...
links: