Versions Compared

Key

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

...

  • The Mapper Snap does not support Base64URL decoding.

  • Expressions used in this Snap (downstream of any Snowflake Snaps) that evaluate to very large values such as EXP(900) displays as Infinity in the input/output previews. However, the exact evaluated values are in the validation previews. Learn more: Java Script JavaScript Limitations in Displaying Numbers.

Snap Views

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Input 

  • Document

  • Binary

  • Min: 0

  • Max: 1

Binary-to-Document

This Snap can have at most one document or binary input view. If you do not specify an input view, the Snap generates a downstream flow of one row.

By default, this Snap has Document as the Input type. You can select Binary type if your input is in Binary format.

Output

  • Document

  • Binary

  • Min: 1

  • Max: 1

Any Document Snap

This Snap has exactly one document or binary output view.

By default, the Output type is Document. You can select the Binary type to view the output in the Binary format.

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 with one of the following options from the When errors occur list under the Views tab. The available options are:

  • 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 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.

...

Field Name

Field Type

Description

Label*

Default Value: Mapper
Example: Extract Employee Data

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
Example: Selected

Checkbox

Select this checkbox to set the target value to null if the source path does not exist. For example, $person.phonenumbers.pop() ->$ lastphonenumber might result in an error if person.phonenumbers does not exist in the source data. But, when you select this checkbox, the Snap does not display an error. Instead, it writes null to lastphonenumber
If you deselect this checkbox, the Snap fails if the source path does not exist. The Snap either ignores the entire record or writes the record to the error view (based on the setting of the error view field).

Pass through

Default Value:Deselected
Example:Selected


Checkbox

Select this checkbox so the Snap passes all the original input data into the output document with the data transformation results.

If you deselect this checkbox, only the data transformation results in the mapping section appear in the output document and the input data is discarded.

Note

This setting is impacted by Mapping Root. If Mapping Root is set to $ and Pass through is deselected, anything not mapped in the table does not pass through. However, if Mapping Root is set to $customer and Pass through is deselected, it only applies to the items in the Mapping Root level. That means that anything above the Mapping Root level passes through and items at the Mapping level that are not mapped in the table do not pass through. 

Expand
titleWhen to select Pass through

Always select Pass through if you plan to leave the Target path field blank; otherwise, the Snap displays an error indicating the field you want to delete does not exist. This is the expected behavior.

For example, you have an input file that contain a number of attributes and you need only two of these downstream. To accomplish that:

1. Connect a Mapper Snap to the downstream Snap.

2. List the two attributes you need in the Expression fields,

3. Leave the Target path field blank.

4. Select Pass through.

When you execute the pipeline, this Snap evaluates the input document/binary data and extracts the two attributes that you want, and passes the entire document/binary data through to the Target schema. From the list of available attributes in the Target Schema, the Mapper Snap picks up the two attributes you listed in the Expression fields, and passes them as output. However, if you do not select the Pass through checkbox, the Target Schema would be empty, and the Snap displays No schema available error.

Transformations*


Use this field set to configure the settings for data transformations.

Mapping Root

Default Value: $
Example: $

String/Suggestion

Specify the subsection of the input data to map.  Learn more: Understand the Mapping Root.

Input Schema

Dropdown list

Select the input data (from the upstream Snap) that you want to transform. Drag the item you want to map and place it under the Mapping table.

Sorted

Default Value: Selected

Checkbox

Select this checkbox to sort the input schema and the target schema. The sort options are:

  • All: Sorts both mapped and unmapped data.

  • Mapped: Sorts only the mapped data.

  • Unmapped: Sorts only the unmapped data.

Mapping table*

Use this field set to specify the source path, expression, and target path columns used to map schema structure. The mapping table makes it easier to:

  • Determine which fields in a schema are mapped or unmapped.

  • Create and manage a large mapping table through drag-and-drop.

  • Search for specific fields.

Learn more about Use the Mapping Table.

Expression*

Default Value: N/A
Example: $first.concat(" ", $last) 

String/Expression

Specify the function to use to transform the data. For example, combine, concatenate, or flatten. Expressions that are evaluated replace the source targets at the end of the pipeline runtime.

Note

The data from previous undefined Snaps in the Mapping Table pass through the Data Snap to the next Snap. However, when you define output fields in the Target Path, and if the field name is the same as a field name that would otherwise pass through, the field in the mapping table overrides the output. 

Learn More: Understanding Understand Expressions in SnapLogic and Using Use Expressions for usage guidelines.

Expand
titleManaging Numeric Inputs in Mapper Expressions

When working you work with upstream numeric data, you might see some unexpected behavior. For example, consider a mapping that reads as follows:

Expression: $num +100
Target path: $numnew

For example, the value being passed from upstream for $num is 20.05. You would expect the value of $numnew to now be 120.05. ButHowever, when you execute the Snap, the value of $numnew is shown as 20.05100.

This happens because, as of now, the Mapper Snap reads all incoming data as strings, unless they are expressly specifically listed as integers (INT) or decimals (FLOAT). So, to ensure that the upstream numeric data is appropriately interpreted, parse the data as a float . This will to convert the numeric data into a decimal; , and all calculations performed on the upstream data in the Mapper Snap will work as expected:

Expression: pareFloat($num1)+100
Target path: $numnew

The value of $numnew is now shown as 120.05.

Target path

Default Value: N/A
Example: $FirstName

String/Suggestion

Specify the target JSON path where the value from the evaluated expression is written. For example, after evaluation of the $person.firstname expression, the Snap inserts the firstname for the person object.

Target Path Recommendation

Info

Iris simplifies configuring the Target path property in this Snap with suggestions for the Expression and Target path fields mapping. To make these suggestions, Iris analyzes Expression and Target path mappings in other Pipelines in your Org and suggests the exact matches for the Expressions in your current pipeline. The suggestions are displayed when you click the Suggestion (blue star) icon in the Target path. 

For example, you have the Expression $Emp.Emp_Personal.FirstName in one of your pipelines. You set the Target path for this expression as $FirstName. Now, if you use the expression $Emp.Emp_Personal.FirstName in a new pipeline, then Iris recommends $FirstName as one of the Target paths to help you standardize the naming standards in your org.

The following shows how Iris recommends the Target path in a Mapper Snap:

Snap Execution

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.

...

...