Versions Compared

Key

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

In this article

Table of Contents
maxLevel2
absoluteUrltrue

Overview

Use this Snap to consolidate multiple input streams into a single output document, where each input stream is displayed as a label containing the records that were received by that input view.

Note that this Snap does not complete executing until the execution of all upstream Snaps is done.

Note

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
required
field:

!$.isEmpty()

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.

...

Field NameField DependencyDescription
LabelN/A

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.

Default Value: Gate
Example: Ensure Complete Execution

Ignore empty streamN/A

Enables you to indicate whether you want the Snap to ignore empty streams received at the input view during Pipeline execution. If this option is selected, 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

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

...

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.

Download this Pipeline

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:

    Info

    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.

Downloads

Attachments
patterns*.slp, *.zip

...