COOPY » Guide  version 0.6.5
ssmerge

Merge table/database/spreadsheets.

The first file must be a common ancestor of the remaining two.

Usage

Index

Option summary

Option details

--bid=COLUMN
boost a column (repeat option for multiple columns)

--default-table=TABLE
name to use when a table name is needed and not supplied

--fixed-columns
ignore new or removed columns

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

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

--help
show how to use this program

--id=COLUMN
set primary key (repeat option for multi-column key)

--inplace
if modifications are made, make them in place without a copy

--input-formats
list supported input database formats

--named
trust names of columns, omitting checks for column renames

--output=OUTPUTFILE
direct output to this file (default is standard output)

--patch-formats
list supported patch formats

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

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

--unordered
treat order of rows as unimportant

Examples

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

ssmerge --test-file numbers.csv
ssmerge --test-file numbers_buggy.csv
ssmerge --test-file numbers_buggy_add.csv
ssmerge --test-file numbers_conflict.csv

Example 1

ssmerge numbers_buggy.csv numbers.csv numbers_buggy_add.csv

Merge two CSV tables (numbers.csv and numbers_buggy_add.csv) with a common ancestor (numbers_buggy.csv).

Example 2

ssmerge --theirs numbers_buggy.csv numbers.csv numbers_conflict.csv

Merge numbers.csv and numbers_conflict.csv (with common ancestor numbers_buggy.csv), deferring to numbers_conflict.csv in the case of conflict.

Example 3

ssmerge --ours numbers_buggy.csv numbers.csv numbers_conflict.csv

Merge numbers.csv and numbers_conflict.csv (with common ancestor numbers_buggy.csv), deferring to numbers.csv in the case of conflict.

Example 4

ssmerge --inplace --theirs numbers_buggy.csv numbers.csv numbers_conflict.csv

Merge directly into numbers.csv. Without --inplace, output goes to standard output.

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)

Version

ssmerge version 0.6.5

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines