Structure
Overview
Transform-type Snap
Works in Ultra Tasks
- Update value
- the value is replaced
| Source Data | Pass Through | Source Path | Operation | Target Path | Target Data |
|---|---|---|---|---|---|
|
Yes | $first_name |
update | $last_name |
|
- Update map
- key in map is updated
| Source Data | Pass Through | Source Path | Operation | Target Path | Target Data |
|---|---|---|---|---|---|
|
Yes | $first_name |
update | $address |
|
- Update list
- value is appended to list
| Source Data | Pass Through | Source Path | Operation | Target Path | Target Data |
|---|---|---|---|---|---|
|
Yes | $first_name |
update | $names |
|
- Update list of maps
- value is appended to the end of each listNote: If a list does not have all the same type scalar, map, or list, then the pipeline will fail.
| Source Data | Pass Through | Source Path | Operation | Target Path | Target Data |
|---|---|---|---|---|---|
|
Yes | $first_name |
update | $customers |
|
- Update list of lists
- value is added to each map of the listNote: If a list does not have all the same type scalar, map, or list, then the pipeline will fail.
| Source Data | Pass Through | Source Path | Operation | Target Path | Target Data |
|---|---|---|---|---|---|
|
Yes | $first_name |
update | $list_of_lists |
|
Read-type Snap
Does not support Ultra Tasks
Snap views
| View | Description | Examples of upstream and downstream Snaps |
|---|---|---|
| Input | This Snap has exactly one document input view. | JSON Generator |
| Output | This Snap has exactly one document output view. | Group By 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 when running the pipeline by choosing one of the following options from the When errors occur list under the Views tab. The available options are:
Learn more about Error handling in Pipelines. |
|
Snap settings
- Expression icon (
): Allows using JavaScript syntax to access SnapLogic Expressions to set field values dynamically (if enabled). If disabled, you can provide a static value. Learn more.
- SnapGPT (
): Generates SnapLogic Expressions based on natural language using SnapGPT. Learn more.
- Suggestion icon (
): Populates a list of values dynamically based on your Snap configuration. You can select only one attribute at a time using the icon. Type into the field if it supports a comma-separated list of values.
- Upload
: Uploads files. Learn more.
| Field / Field set | Type | Description |
|---|---|---|
| Label | String |
Required. Specify a unique name for the Snap. Modify this to be more appropriate, especially if more than one of the same Snaps is in the pipeline. Default value: Structure Example: Structure Snap |
| Pass Through | Dropdown list |
Required. Determine if data should be passed through or not.
If set to yes, then the input data and its structure will be used. However, the
output data structure can be changed by setting pass through to [None] - new map or
[None] - new list. For example, if the input data is a key/value (map) structure,
then the output structure can be changed to a list by setting pass through to [None]
- new list and using target paths of list indices ($[0], $[1], $[2], etc).Options
available include:
Default value: Yes |
| Mapping Table | String/Expression | Required. Source path, operation, and target path to use
in the Snap. Source path is the JSONPath to move/delete. Operation is the
type of operation to execute (move/delete). Target path is the JSONPath to write a
value to in a move operation. Default value: N/A Example:Source Path | Operation | Target Path $first_name | move | $name.first $phone_num | delete | $names[2] | delete | $names[*].first | move | $first_names |
| Snap execution | Dropdown list |
Choose one of the three modes in
which the Snap executes. Available options are:
Default value: Validate & Execute Example: Execute only |
Example Output
| Source Data | Pass through | Null-safe access | Source Path | Operation | Target Path | Target Data |
|---|---|---|---|---|---|---|
|
Yes | Deselected | $mid_name | delete |
|
|
|
Yes | Deselected | $first_name | move | $fname |
|
|
[None]-new map | Deselected | $first_name | move | $fname |
|
|
[None] - new list | Deselected | $first_name | move | $[0].fname |
|
|
Yes | Deselected | $mid_name | move | $middle | Pipeline fails |
|
Yes | Selected | $mid_name | move | $middle |
|
|
Yes | Deselected | $mid_name | delete | Pipeline fails | |
|
Yes | Selected |
$first_name $first_name |
move |
$name1 $name1 |
|
|
Yes | Deselected | $person.first | move | $first |
|