Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
aswinkarthik committed Apr 15, 2018
1 parent 837df49 commit 25df6d8
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,16 @@ $ csvdiff run --base base.csv --delta delta.csv
...
```

## Installation

```
go get -u github.com/aswinkarthik93/csvdiff
```

## Usecase

- Cases where you have a base database dump as csv. If you receive the changes as another database dump as csv, this tool can be used to figure out what are the additions and modifications to the original database dump. The `additions.csv` can be used to create an `insert.sql` and with the `modifications.csv` an `update.sql` data migration.
- As the delta file, it supports passing of just the changes as well as the entire csv file.
- The delta file can either contain just the changes or the entire table dump along with the changes.

## Supported

Expand Down Expand Up @@ -81,6 +87,18 @@ Dataset is used from this [blog](https://blog.majestic.com/development/majestic-
% csvdiff run --base base.csv --delta delta.csv --additions additions.csv --modifications modifications.csv
```

## Build locally

```bash
$ git clone https://github.com/aswinkarthik93/csvdiff
$ go get ./...
$ go build

# To run tests
$ go get github.com/stretchr/testify/assert
$ go test -v ./...
```

## Algorithm

- Creates a map of <uint64, uint64> for both base and delta file
Expand Down

0 comments on commit 25df6d8

Please sign in to comment.