Versions Compared

Key

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

...

Pivot Snap is a Transform-type Snap that transforms the selected fields by shifting the selected field names and their values to values of a target field and target value field, respectively.

...

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Input 

Document

  • Min: 1

  • Max: 1

  • Mapper

  • Copy

Documents with a nested or flat map data.

Output

Document

  • Min: 1

  • Max: 1

  • File Reader

  • Zip File Read

  • Mapper

Stream of documents with a pivoted map data . The and the pivoted fields.

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

...

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 in the fieldset.

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

Field Name

Field Type

Field Dependency

Description

Label*

Default ValuePivot
ExamplePivot contract emps

String

None.

Specify a unique name for the Snap.

Selected Fields

Use this field set fieldset to select fields to be pivoted or remain unchanged in the output document based on the value of the Treat selected fields as static checkbox.

Selected Field

Default Value: N/A
Example: $StudentName

String/Suggestion

None.

Specify or select the field to be included in the action.

If Field Absent

Default Value: N/A
Example: Ignore

Dropdown list

None.

Select one of the following options to apply for the selected field:

  • Ignore

  • Substitute null

  • Substitute empty string

  • Substitute zero

Treat selected fields as static

Default Value: Deselected

Checkbox

None.

Select this checkbox to treat selected fields as static in the output document. Selecting this checkbox enables the following fields:

  • No Pivots Target Field Behavior

  • No Pivots Target Value Behavior

Selecting this checkbox affects the processing of the input documents and preserves the structure of the selected fields while when the remaining fields are pivoted.

Target Pivoted Field*

Default Value: N/A
Example: $Student

String/Suggestion

None.

Specify or select the target pivoted field.

Target Pivoted Value*

Default Value: N/A
Example: Score

String/Suggestion

None.

Specify or select the target pivoted value.

No Pivots Target Field Behavior*

Default Value: Substitute null
Example: Ignore

Dropdown list

Appears when you select the Treat selected fields as static checkbox.

Select one of the following options (behavior) you want to apply on the target fields—by default if no fields remain to be pivoted (all fields selected as static).

  • Ignore

  • Substitute null

  • Substitute empty string

  • Substitute zero

No Pivots Target Value Behavior*

Default Value: Substitute null
Example: Ignore

Dropdown list

Appears when you select the Treat selected fields as static checkbox.

Select one of the following options (behavior) you want to apply on the target fields—by default if no fields remain to be pivoted (all fields selected as static).

  • Ignore

  • Substitute null

  • Substitute empty string

  • Substitute zero

Target field full path

Default Value: Deselected

Checkbox

Appears when you deselect Treat selected fields as static checkbox.

Select this checkbox to include the target field as a full path when the Pivot field property value is nested.

Snap Execution

Default Value
Example: Validate & Execute

Dropdown list

N/A

Select one of the following three modes in which the Snap executes:

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

...