...
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.
...
Limitations and Known Issues
None.
Snap Views
Type | Format | Number of Views | Examples of Upstream and Downstream Snaps | Description |
---|---|---|---|---|
Input | Document |
|
| Documents with |
nested or flat map data. | ||||
Output | Document |
|
| Stream of documents with |
pivoted map data |
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:
|
Learn more about Error handling in Pipelines. |
Snap Settings
Info |
---|
|
Field Name | Field Type | Field Dependency | Description | |
---|---|---|---|---|
Label* Default Value: Pivot | String | None. | Specify a unique name for the Snap. | |
Selected Fields | Use this |
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 | String/Suggestion | None. | Specify or select the field to be included in the action. | |
If Field Absent Default Value: N/A | Dropdown list | None. | Select one of the following options to apply for the selected field:
| |
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:
Selecting this checkbox affects the processing of the input documents and preserves the structure of the selected fields |
when the remaining fields are pivoted. | ||||
Target Pivoted Field* Default Value: N/A | String/Suggestion | None. | Specify or select the target pivoted field. | |
Target Pivoted Value* Default Value: N/A | String/Suggestion | None. | Specify or select the target pivoted value. | |
No Pivots Target Field Behavior* Default Value: Substitute null | 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).
| |
No Pivots Target Value Behavior* Default Value: Substitute null | 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).
| |
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: | Dropdown list | N/A | Select one of the following three modes in which the Snap executes:
|
Troubleshooting
Error | Reason | Resolution |
---|---|---|
If a Selected Field has a space in the name, an error is displayed and the Snap fails. | The Selected field does not support empty spaces. | Enclose the field value in braces and single quotes ( [' ']). For example, |
Invalid default behavior for pivoted target field and target value. | Behavior for one of the Target field or Target value fields cannot be | Select Ignore behavior or non-Ignore behavior for both target field and target value and retry |
Examples
Behavior of Pivot Snap when the
...
Treat selected fields as static
...
checkbox is
...
Deselected
This example Pipeline demonstrates the expected behavior of Pivot Snap when the Treat selected fields as static checkbox is deselected (default option).
...
On validating the Snap, the Snap returns all the fields in the output as per the configured behavior for the Selected fields.
...
...
Behavior of Pivot Snap when the
...
Treat selected fields as static
...
Checkbox is
...
Selected
Scenario 1: Selected fields are present in the input document
...
Related Links