Versions Compared

Key

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

...

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Input

Document 

Min: 1

Max: 1

JSON Generator

The data in the input document to filter.

Output

Document 

Min: 1

Max: 1

  • Mapper

  • Pipeline Execute

The filtered document.

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:

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

  • Discard Error Data and Continue: Ignores the error, discards that record, and continues with the remaining 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

Info
  • Asterisk ( * ): Indicates a mandatory field.

  • Suggestion icon ((blue star)): Indicates a list that is dynamically populated based on the configuration.

  • Expression icon ((blue star) ): Indicates the value is an expression (if enabled) or a static value (if disabled). Learn more about Using Expressions in SnapLogic.

  • Add icon ( (blue star) ): Indicates that you can add fields to the field set.

  • Remove icon ( (blue star)): Indicates that you can remove fields from the field set.

  • Upload icon ((blue star) ): Indicates that you can upload files.

Field 

Field Type

Description

Label*


Default Value: Filter
Example: Filter

String

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.

Null-safe access


Default Value: Deselected

Checkbox

Select this checkbox to consider the missing data or empty value as null when accessing the source path.

If you deselect this checkbox, the Snap fails and displays error in case there is missing data or empty value when accessing the source path.

Filter Expression*

Default Value: None
Examples:

$first_name == "Joe"
$people[0].age > 15
$Customers.contains(_customer)

startsWith($description, "Snap") && $quantity < 100 

String/Expression

The expression to evaluate. If this expression evaluates to true, then the document will be passed through. Otherwise, the document will be dropped. If the expression does not evaluate to a boolean, then the pipeline will fail.

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

...

Filter missing data or empty

...

values using the Null-safe access option

This example Pipeline pipeline demonstrates how to filter data even when there is with missing data or empty values using the Null-safe Access access checkbox.

...

  1. Configure the JSON Generator Snap with the following data. Each

...

  1. record has location and salary except ID102, which does not have the location.

...

  1. Configure the Filter expression as $location=="Hyderabad" || $salary>=20000

...

  1. which means the Snap should filter and display the records in the output that has the location as Hyderabad OR the salary at least INR 20000.

...

  1. Select the Null-safe access

...

  1. checkbox—the Snap then finds any missing data while accessing the source path ( such as record#102, which does not have a location)

...

  1. ; the Snap considers the field

...

  1. null,

...

  1. a valid filter criteria.

...

    ...

    1. Validate the

    ...

    1. pipeline, the Filter Snap returns the output as follows:

    ...

    Downloads

    Multiexcerpt include macro
    namedownload_instructions
    pageOpenAPI

    ...