COOPY » Guide  version 0.6.5

Show the difference between two tables/databases/spreadsheets.



Option summary

Option details

filter for an action of a particular type (update, insert, delete, none, schema)

apply difference between FILE1 and FILE2 immediately to FILE1

boost a column (repeat option for multiple columns)

Number of rows of context before and after changes for highlighter diffs ("all" to include all rows)

name to use when a table name is needed and not supplied

exclude the specified column even if changed

ignore new or removed columns

set difference format for output

expect git-compatible parameters (path old-file old-hex old-mode new-file new-hex new-mode)

ignore rows removed at the beginning of a table (such as a log file)

treat any embedded column names as regular parts of the table (for formats like CSV)

show how to use this program

set primary key (repeat option for multi-column key)

include the specified column even if unchanged

list supported input database formats

prioritize low memory usage over speed

trust names of columns, omitting checks for column renames

omit any version-dependent header from diff

omit any sheet/table name from diff

direct output to this file (default is standard output)

use named workbook/database as common ancestor in difference calculations

list supported patch formats

check if FILE2 looks like a patch, and if so, apply it

filter for a named table of a workbook/database (repeat option for multiple tables)

ignore rows removed at the end of a table (such as a log file)

treat order of rows as unimportant

set the desired dialect when using a poorly defined output format (currently for SQL, available variants are: sqlite, access)


You can generate test file(s) for the examples that follow:

ssdiff --test-file numbers.csv
ssdiff --test-file numbers.sqlite
ssdiff --test-file numbers_buggy.csv
ssdiff --test-file numbers_buggy.sqlite

Example 1

ssdiff numbers_buggy.csv numbers.csv

Compare two tables. Output goes to standard output.

Example 2

ssdiff --unordered numbers_buggy.csv numbers.csv

Compare two tables, neglecting row order.

Example 3

ssdiff --format sql numbers_buggy.sqlite numbers.sqlite

Compare two databases, with output in SQL format.

Example 4

ssdiff --format hilite --output review.csv numbers_buggy.csv numbers.csv

Generate tabular diff for eyeballing. If ssdiff is compiled with gnumeric support, and output format is *.xls, color highlighting is added.

Patch formats

Database/spreadsheet file formats

CSV: plain-text delimiter-separated family of formats

SQLITE: file-based database

SQLITEXT: sqlite-format sql dump

JSONBOOK: Spreadsheet formats in json

GNUMERIC: Spreadsheet formats (via gnumeric)

MDB: Access database format (via Mdbtools, READ-ONLY)

JMDB: Access database format (via Jackcess)

MYSQL: database connector

SOCIALCALC: SocialCalc format (via mozjs)


ssdiff version 0.6.5

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines