pgloader/examples
dim 8ed1e0ff2c New version of pgloader (2.0.2):
* new developpers
* python code replaces tcl code
* one config file for many tables (one command line for loading them all)
* manpage
* debian package
* supports multi-line input file (without quotes)
* Informix large objects support (loading to TEXT or BYTEA)
* configurable amount of rows per COPY instruction
* trailing slash optionnal removal (support informix UNLOAD file format)
* begin processing at any line in the file, by number or row id
* dry-run option, to validate input reading without connecting to database
* pedantic option, to stop processing on warning
2006-11-19 21:18:42 +00:00
..
clob New version of pgloader (2.0.2): 2006-11-19 21:18:42 +00:00
cluttered New version of pgloader (2.0.2): 2006-11-19 21:18:42 +00:00
errors New version of pgloader (2.0.2): 2006-11-19 21:18:42 +00:00
simple New version of pgloader (2.0.2): 2006-11-19 21:18:42 +00:00
pgloader.conf New version of pgloader (2.0.2): 2006-11-19 21:18:42 +00:00
README New version of pgloader (2.0.2): 2006-11-19 21:18:42 +00:00

In this directory you'll find out some pgloader usage examples.

To use them, please first create a pgloader database, then for each example
the tables it needs, then issue the pgloader command:

 $ createdb --encoding=utf-8 pgloader
 $ cd examples
 $ psql pgloader < simple/simple.sql
 $ ../pgloader.py -Tvc examples/pgloader.conf simple

If you want to load data from all examples, create tables for all of them
first, then run pgloader without argument.

The provided examples are:

. simple

  This dataset shows basic case, with trailing separator and data
  reordering.

. errors

  Same test, but with impossible dates. Should report some errors. It does
not report errors, check you're not using psycopg 1.1.21.

. clob

  This dataset shows some text large object importing to PostgreSQL text
  datatype.

. cluttured

  A dataset with newline escaped and multi-line input (without quoting)
  Beware of data reordering, too.


You can launch all those pgloader tests in one run, provided you created the
necessary tables:

 $ for test in simple clob cluttured; do psql pgloader < $test/$test.sql; done
 $ ../pgloader.py -Tc pgloader.conf

 [...]

 Table name        |    duration |    size |    updates |     errors
 ====================================================================
 clob              |      0.121s |   32 kB |          7 |          0
 cluttered         |      0.041s |   32 kB |          3 |          0
 simple            |      0.040s |   16 kB |          6 |          0
 ====================================================================
 Total             |      0.369s |   80 kB |         16 |          0

And you then have a nice summary.