aswinkarthik / csvdiff

A fast diff tool for comparing csv files
https://aswinkarthik.github.io/csvdiff/
MIT License
532 stars 57 forks source link

Add use case example to populate additions.csv, modifications.csv & deletions.csv #51

Open EarthlingDavey opened 3 years ago

EarthlingDavey commented 3 years ago

Firstly, thanks for this open source software. It will save me from wasting a bunch of time importing unchanged csv rows into my database.

Feature request

In the README.md, a suggested use case is having additions.csv & modifications.csv. I cannot see in the documentation a suggested way to do this.

As a golang newbie, my approach is to:

  1. Write the stout to a file like this csvdiff base-small.csv delta-small.csv -o rowmark > rowmark-small.csv
  2. Parse and filter the rowmark-small.csv to make the 3 files additions.csv, modifications.csv & deletions.csv

This, seems slightly inefficient as I'm 'parsing' the data twice, once with csvdiff, then again.

Is there a better method to get the files? Or, could this be a feature request where csv-files could be entered as an argument for output format.