Diff
Overview
You can use this Snap to compare two sorted streams of documents (Original and New) and return four output streams: Deletions, Insertions, Modified, and Unmodified.
Ensure the first input is always New and the second input as Original in order for the Snap to display the output (insertions/deletions/modifications) in reference to the original document.

Transform-type Snap
Does not support Ultra Tasks
Limitations
When using the new UI form to create new or edit existing Pipelines with the Diff Snap, Output view name values go missing in Snap Settings after switching to the Views or Info tab. The workaround is to switch back to the old UI form (disable New UI Form in User Settings) and then create the new Pipelines or edit existing pipelines.
Snap views
| View | Description | Examples of upstream and downstream Snaps |
|---|---|---|
| Input |
This Snap has exactly two document input views: New and Original. Ensure the first input is always New and the second input as Original in order for the Snap to display the output (insertions/deletions/modifications) in reference to the original document. |
|
| Output |
This Snap has four document output views:
|
|
| 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 pipeline parameters to set field values dynamically (if enabled). SnapLogic Expressions are not supported. If disabled, you can provide a static value.
- 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: Diff Example: Diff_new |
| Sort paths | String | Required. Specify the list of paths to sort on. For
example, to sort a list of person objects by the field firstname,
then $person.firstname should be used.Default value: None Example: $person.firstname |
| Sort order | Dropdown list | Required. Allows you to map output view name to output
view type if you removed and then re-added output views. Default value: Ascending Example: Descending |
| Output view mapping | String | Required. Allows you to map output view name to output view type if you removed and then re-added output views. |
| Snap execution | Dropdown list |
Choose one of the three modes in
which the Snap executes. Available options are:
Default value: Validate & Execute Example: Disabled |