Head

Overview

You can use this Snap to send the specified number of documents received from the upstream Snap to the output view.

snap-head-overview.png

Snap Type

The Head Snap is a Flow-type Snap.

Support for Ultra pipelines

Does not work in Ultra Pipelines.

Snap Views

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Input

Document

  • Min: 1

  • Max: 1

  • JSON Generator

  • Mapper

Number of input documents to send to the output view.

Output

Document

  • Min: 1

  • Max: 1

  • Copy

  • Mapper

The output is structured results in JSON format based on the input records.

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 while running the Pipeline by choosing one of the following options from the When errors occur list under the Views tab:

  • Stop Pipeline Execution: Stops the current pipeline execution when the Snap encounters an error.

  • Discard Error Data and Continue: Ignores the error, discards that record, and continues with the rest of the records.

  • Route Error Data to Error View: Routes the error data to an error view without stopping the Snap execution.

Learn more about Error handling in Pipelines.

Snap Settings

Field Name

Field Type

Description

Field Name

Field Type

Description

Label

 

Default value: Head
Example: Head

String

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

Number of documents

 

Default value: 1
Example: 5

String/Expression

Required. Specify the number of documents to send to the output view.

 

Documents offset

Default value: 0
Example: 1

String/Expression

Specify the number of documents to offset relative to the start of the input stream. This is used to exclude headers or similar data from being processed by the Snap.

 

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.

Â