In this article


You can use this Snap to consolidate all documents from upstream Snaps into a single output document. Based on the Snap's configuration, each input stream displays the count of documents, all records, first record or the final record.

This Snap does not complete executing until the execution of all upstream Snaps is done.

Unless the Ignore empty stream checkbox is selected, the Gate Snap always produces an output document, regardless of how many or if no input documents are received. In some Pipeline designs, this functionality can trigger an error message stating, mapped variables are missing, during validation. This error typically occurs when a downstream Snap expects a field based off an output document from the Gate Snap that is empty.

To prevent the error from occurring, you can limit empty documents produced by the Gate Snap by inserting a Filter Snap after it with the following expression in the Filter Expression


When you run the Pipeline after adding the Filter Snap with this expression, the Pipeline validates and executes successfully, and the error no longer occurs.


If large amounts of data are required for your output, offload your data prior to Snap execution, and write the data to a file or database. Upon the completion of Snap execution, you can use a Reader Snap (such as File Reader and S3 Reader) to read from the offloaded data source.

Support for Ultra Pipelines

Does not support Ultra Pipelines.


  • This Snap does not have error views. If the Snap fails during validation or execution, documents are not passed through and you receive an error message.
  • You cannot use this Snap for massive data propagation (All input documents), as it collects multiple input documents into a single output document, which leads to severe system memory consumption. To mitigate the memory impact, you can use either of the two alternatives under Output Document Content field.

Snap Input and Output

Input/OutputType of ViewNumber of ViewsExamples of Compatible Upstream and Downstream SnapsDescription
Input Document
  • Min: 1
  • Max: ∞
  • Mapper
  • JSON Parser
  • Join
One or more documents containing records that must be passed on to downstream Snaps for further processing.
  • Min: 1
  • Max: 1
  • Copy
  • Join
  • Common Words

A single document that contains all the records received from the various upstream Snaps.

Snap Settings

Field NameField TypeDescription

Specify a 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.

Default Value: Gate
Example: Ensure Complete Execution

Ignore empty streamCheckbox

Select this checkbox to enable the Snap to ignore empty streams received at the input view during Pipeline execution. In such a case, the Snap does not produce any output document; else, the Snap writes an empty array to the output document.

Default Value: Deselected
Example: N/A

Output Document Content

Dropdown list

Choose an option to indicate the document count and the specific document to include in the output. This option helps avoid excessive memory consumption. The available options are:

  • All input documents: Waits for all the input documents to include in the output.
  • Document count and first document for each inputIncludes document count and the first document from each input in the output. If an input has no documents, the output is displayed as null for the first document from that input.

  • Document count and final document for each inputIncludes document count and the final document from each input in the output. If an input has no documents, the output is displayed as null for the final document from that input.

Using All input documents option can consume a lot of memory. If your use case does not require all of this data, consider using other options for Output Document Content, which are less memory intensive.

For more information, see this example.

Default ValueAll input documents
ExampleDocument count and first document for each input

Snap ExecutionN/A

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.

Default Value: Validate & Execute
Example: Execute only


Combining Completed Upstream Execution Output

This example demonstrates how you can use the Gate Snap to combine the complete output of multiple upstream Snaps into a single document. This example also shows how the Gate Snap does not offer any output until all upstream Snaps have completed executing.

Understanding the Pipeline

  1. You add a File Reader Snap to the Pipeline and configure it to read a CSV file containing contact information:

  2. You add a CSV Parser Snap to read the input binary data as CSV. Once this Snap validates, you can view the contents of the file that the File Reader Snap read:

  3. You create a separate branch of the Pipeline by adding an unconnected REST Get Snap. You configure the Snap to retrieve contact data from HubSpot, which typically offers data in pages of 20 records each. You use the Has next and Next URL fields to specify how the Snap can retrieve additional pages of data. For step-by-step information on how to use the REST Get Snap to perform this task, see Retrieving Contact Information from HubSpot.

    The REST Get Snap retrieves the data in pages of 20 as requested until the value of the has-more variable changes to false:

    Note that until the REST Snap completes executing, the Gate Snap doesn't start reading data from any of its input views.

  4. You create another branch of the Pipeline by adding a JSON Generator Snap that provides customer information:

  5. You add a Gate Snap and configure it to have three input views:

    You make no further changes to the Gate Snap and connect its three inputs to each of the branches you created in the steps above.

  6. You save and run the Pipeline. The Gate Snap now collects the completed inputs from all upstream branches and offers them all as separate arrays in a single output document:

  7. To check how the Gate Snap behaves when one of the Snaps does not offer any output, you introduce an error into the REST Get Snap:

  8. You now save and re-execute the Pipeline. The Gate Snap now offers an output which contains all the data received from the File Reader and JSON Generator branches; but in the output associated with the REST Get Snap, it outputs a null record:

Download this Pipeline.

Collecting the Output Document Content

This example Pipeline demonstrates the following three methods in which to collect the output document content from the upstream Snaps using the Gate Snap.

  • All input documents
  • Document count and first document for each input

  • Document count and final document for each input

We build three Pipelines to pass data using two Mapper Snaps and empty data from the JSON Generator Snap.

We connect the Gate Snap to the upstream Snaps. We configure the Gate Snap in each Pipeline with each of the options under Output Document Content field as highlighted in the screenshots below. Upon validation, the Snaps yield the respective outputs based on the configuration.

Download this Pipeline.


Important steps to successfully reuse Pipelines

  1. Download and import the Pipeline into SnapLogic.
  2. Configure Snap accounts as applicable.
  3. Provide Pipeline parameters as applicable.

See Also

Snap Pack History

 Click to view/expand
ReleaseSnap PackDateTypeUpdates





Upgraded with the latest SnapLogic Platform release.

4.28 Patch428patches15026 Latest

Fixed an issue with HTTP Router Snap where the Snap did not work as intended for a GET request that used a Cloud URL when the HTTP Router was the first Snap in the triggered task Pipeline.

4.28main14627 StableEnhanced the Filter Snap with the Null-safe access checkbox. Select this checkbox to consider the valid values in the filter expression and remove the missing or empty data instead of treating them as null.
4.27 Patch427patches13726

Enhanced the Filter Snap with the Null-safe access checkbox. Select this checkbox to consider the missing data or empty value as null when accessing the source path.

StableEnhanced the Gate Snap with the Output Document Content field that enables you to indicate the count of input documents and the specific (first or last) document to include in the output.

Added Binary Copy Snap to copy a binary stream to the Snap’s output views. You can use this Snap if you want to send the same information to multiple endpoints.

4.25 Patch425patches10571

Enhanced the performance of Binary Router Snap via more efficient IO utilization.


Enhanced the HTTP Router Snap to support Ultra Pipelines.


Added the Ignore empty stream checkbox to the Gate Snap Settings


Enhances the Data Validator Snap by making the Constraint value field as optional under the Constraints.

StableUpgraded with the latest SnapLogic Platform release.
4.21 Patch                     flow8855-Latest

Fixes the Binary Router Snap's failure in Ultra Pipelines by preventing a deep-copy (performing a copy of the original objects recursively) of binary data headers.

4.21snapsmrc542-StableUpgraded with the latest SnapLogic Platform release.
  • Adds a new Snap, Gate, which enables you to consolidate multiple input streams into a single output document where each input stream is displayed as a label containing the list of records that were received by that input view.
  • The Pipeline Execute Snap now provides the following capabilities:
    • Specify the Snaplex on which to run child Pipelines. You can now select the Snaplex on which to run the child Pipelines through the Execute On and Snaplex Path fields. The default option is executing the child Pipeline on the same Snaplex node as the Parent, but you can also specify a different Snaplex through the drop-down list, which includes the option to manually enter a Snaplex name.
    • Configure retry logic for child Pipeline executions. You can now configure retry logic for child Pipeline executions though the following fields: Number of Retries, Retry Interval, and Timeout fields.
4.19snaprsmrc528-StableUpgraded with the latest SnapLogic Platform release.
4.18 Patchflow7743-Latest

Added a property Validate full JSON path to the Data Validator Snap to fix an issue wherein a field validation failure against a constraint does not produce an error.

4.18snapsmrc523-StableUpgraded with the latest SnapLogic Platform release.
4.17 Patchflow7637-Latest

Fixed an issue with the Data Validator Snap wherein the output fails to report all but one of the violations when there are multiple constraints of the Required type.

4.17 PatchALL7402-Latest

Pushed automatic rebuild of the latest version of each Snap Pack to SnapLogic UAT and Elastic servers.


Added the Snap Execution field to all Standard-mode Snaps. In some Snaps, this field replaces the existing Execute during preview check box.


Pipeline Execute Snap: Added the capability to select either document (previously supported) or binary data (new) for your input and output Views.

4.15 Patchflow6263-Latest

Improved the error messages to include the source path of the constraint for data validation failures.

4.15snapsmrc500-StableUpgraded with the latest SnapLogic Platform release.
4.14snapsmrc490-StableUpgraded with the latest SnapLogic Platform release.
4.13snapsmrc486-StableUpgraded with the latest SnapLogic Platform release.
4.12 Patchflow4895-Latest

Fixed an issue in the Data Validator Snap that made multiple copies of lineage on the error path.


Resolved an issue with the Union Snap that caused excessive CPU utilization.

4.11 Patchflow4461-Latest

Fixed an issue with the Pipeline Execute Snap that could cause the parent pipeline to freeze when the child pipeline fails.

4.11 Patchflow4292 -Latest

Resolved an issue with the Union Snap in Ultra Mode that spikes the CPU utilization to ~30% during startup of 120 instances.

4.11snapsmrc465-StableUpgraded with the latest SnapLogic Platform release.
4.10snapsmrc414-StableUpgraded with the latest SnapLogic Platform release.
4.9.0 Patchflow3094-Latest

Addressed an issue in Binary Router where the Snap did not wait until all threads were completed to write data to the output views.

4.9.0 Patchflow3320-Latest

Data Validator Snap - fixed Type constraint feature.

4.9snapsmrc405-StableUpgraded with the latest SnapLogic Platform release.

Filter: Snap-aware error handling policy enabled for Spark mode. This ensures the error handling specified on the Snap is used.

4.7.0 Patchflow2598

Addressed a possible race condition when reusing pipelines with a Pipeline Execute Snap.


Fixed an issue with Ultra pipeline when invoking, using Pipeline Execute, a child pipeline that contains a non-Ultra compatible Snap.

  • Recommendation: The Pipeline Execute Snap is meant to eventually replace ForEach and Task Execute. It is suggested you use Pipeline Execute for all new pipelines and update existing pipelines at your earliest convenience.
  • Updated the Pipeline Execute Snap with Execute during preview field.
4.6.0 Patchflow1909

Resolved an issue with Union Snap slowing down pipelines.

  • The following Snaps now support error view in Spark mode: Copy, Union.
  • ForEach: The value for the Maximum instances property is limited to a maximum of 100. A value higher than 100 will automatically be limited down to 100 during pipeline execution.
  • Pipeline Execute: Snaplex property added to let you specify the Snaplex on which to run the child pipeline.
  • Resolved an issue in Task Execute Snap that caused an internal server error (status code: 500).
  • Resolved an issue in Pipeline Execute Snap that did not show parameter suggestions when the pipeline is selected from another project.
  • Resolved an issue in Copy Snap that showed errors on the UI while the Javascript was being executed.
  • Resolved an issue in Filter Snap that failed with "could not filter the document" if upstream data for ServiceNow Query.
  • Resolved an issue with Pipeline Execute not able to load pipeline selected from the pipeline picker property.
  • Enhanced error handling in Pipeline Execute for when Reuse is enabled and the pipeline path is an expression whose result is not constant.
  • Resolved an issue in Pipeline Execute not including the runtime ID and state in error documents.
  • NEW! Pipeline Execute introduced in this release. This Snap provides a way to flexibly and efficiently execute pipelines and flowing documents into and out of these executions.

  • Resolved an issue in Task Execute Snap to ensure JAVA 7 and JAVA 8 Snaplex give the same output.

  • Resolved an issue with the Router Snap routing to the wrong output when used in Spark mode


  • Resolved an issue with Exit Snap hanging during validation if threshold is not met.

  • Spark support added to the Copy, Filter, Router, and Union Snaps.


  • Resolved an issue with Task Execute where java.math.BigInteger cannot be cast to java.lang.String exception if input document variable was a numeric type.

  • Resolved an issue with Task Execute failing with expression enabled.

  • Resolved an issue with data preview not working in the ForEach Snap.

  • Resolved an issue with Execute during Preview functionality broken in the ForEach Snap.

  • Resolved an issue with ForEach Snap not representing the output schema correctly during preview.



Resolved an issue with the ForEach poll interval being inconsistent.


  • In Data Validator, the pattern option now works with partial matches.

  • Exit Snap 

    • Error handling improved to handle messages that are non-strings.

    • Exit Snap now supports expressions in the Exit error message property.

  • ForEach Snap now generates output documents when run. Output documents will also be produced if a child pipeline called by the ForEach is manually stopped.


  • Resolved an issue in ForEach where a recursive pipeline in synchronous mode was unable to finish execution.

  • Resolved an issue in Data Validator not working for partial matches.

August 7, 2015 (2015.25/4.2.1)
  • NEW! Exit Snap introduced in this release. This Snap forces a pipeline to stop with a failed status if it receives more records than the user-defined threshold.

  • Resolved error in ForEach Snap where an exposed error view triggered a pipeline failure.

June 27, 2015 (2015.22)

The Router Snap now supports even distribution across all output views if no expressions are defined. With this change, Routes is no longer a required field.

June 6, 2015 (2015.20)
  • Task Execute should have Execute on preview
  • Directory Browser Snap did not render output data when running from "Windows" Groundplex.

May 15, 2015

ForEach: Error was not thrown on validation if the child pipeline was not provided.

May 2, 2015
  • Binary Router: enhanced error handling
  • Filter: bug fixes
  • Router: bug fixes

December 20, 2014

Updated Snaps may include new or changed functionality or be otherwise improved.

  • Data Validator: Type constraint added.
  • Union Snap: Preserve order was removed.

July/Summer 2014
  • NEW! Binary Router Snap introduced in this release.
  • NEW! Task Execute Snap introduced in this release.

June 30, 2014
  • Data Validator (Beta Release). This Snap validates incoming documents and their attributes against constraints you define.
  • ForEach: Addressed an issue with parallel execution not working properly.

April 2014

ForEach Snap updated to support Snaplex selection and pipeline parameters.

January 2014

NEW! ForEach Snap introduced in this release.

November 2013
  • NEW! Head Snap introduced in this release.
  • NEW! Tail Snap introduced in this release.

Initial Release (June 2013)
  • Router Snap introduced in this release.
  • Copy Snap introduced in this release.
  • Union Snap introduced in this release.
  • Filter Snap introduced in this release.