Skip to content

freewilll/abridger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Abridger

Abridger is a tool which allows for extraction of a subset of a relational database using a yaml configuration file. Sqlite and postgresql databases are supported. Please see the documentation.

Installation

$ sudo pip install abridger

Example Configuration

- relations:
  - { defaults: everything}
- subject:
  - tables:
    - {table: departments, column: name, values: Research}

Examples

Extract data from a postgresql database and add it to another

abridge-db config.yaml postgresql://user@localhost/test -u postgresql://user@localhost/abridged_test

Extract data from a postgresql database and write an sql file

abridge-db config.yaml postgresql://user@localhost/test -f test-postgresql.sql

Extract data from a sqlite3 database and output SQL to stdout

abridge-db config.yaml sqlite:///test-db.sqlite3 -q -f -

About

Abridger postgresql database subsetting

Resources

License

Stars

Watchers

Forks

Packages

No packages published