COOPY » Guide  version 0.6.5
Supported table formats

Programs in the COOPY toolbox can work with tables represented in the following formats:

CSV support is most complete, followed by Sqlite, followed by Gnumeric, followed by MySQL. Good support for all four formats is targeted for version 1.0 of the toolbox.

Specifying sources

The COOPY tools expects to work with files as inputs and outputs. For example:

ssdiff ver1.sqlite ver2.sqlite

To use a database as an input or output, or to add configuration options on how a file should be interpreted, more information needs to be supplied. This can be done in two ways. One is to use a "dbi:*" string. For example:

ssdiff ver1.sqlite dbi:mysql:ver2:username=root

This would compare the sqlite database in "ver1.sqlite" with the mysql database called "ver2". Alternatively, the extra information can be placed in a "proxy" file with a .json extension, in the JSON format. Here is a file users.json to refer to a table called "users" in a mysql database called "db":

  "type": "mysql",
  "database": "db",
  "username": "testy",
  "password": "*****",
  "host": "",
  "port": 3333,
  "table": "users"

More example dbi strings:

dbi:csv:file=hello          # file "hello" is in csv format
dbi:csv::file=hello:there   # file "hello:there" is in csv format
# the use of "::" means that the following key/value pair is the
# last one, and ":" characters should no longer be used as a divider.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines