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.



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

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

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

  4. Next, configure the Diff Snap with the Sort path and Sort order.

  5. 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.
  1. Ensure both input streams are sorted on the same field with the same order before sending to the Diff Snap.
  2. Confirm the Diff Snap is configured with the correct Sort path and Sort order.
  3. Observe the output views to identify deletions, insertions, modifications, and unmodified records.