A Diff Made between Two Files Shows What Data Goes to Which Output View
In this example, a diff is made between two files, showing what data goes to which output view.

-
Consider that the original file contains only a few records (as demonstrated
being created in a CSV Generator Snap, but it can also be read from a File
Reader with a CSV Parser).

-
By comparison, the new file has over 1000 records (again, demonstrated being
created in a CSV Generator Snap).

-
Because the comparison can only be done by sorted stream, each file must be
sorted by the same column, such as
$Last, with the same sort order. Add a Sort Snap after each file input (CSV Generators in this example).
-
Next, configure the Diff Snap with the Sort path and
Sort order.

- This results in deleted lines routing to the Deletions view, new lines to the Insertions view, modified lines to the Modified view, and unchanged lines to the Unmodified view.
- Ensure both input streams are sorted on the same field with the same order before sending to the Diff Snap.
- Confirm the Diff Snap is configured with the correct Sort path and Sort order.
- Observe the output views to identify deletions, insertions, modifications, and unmodified records.