Commit Graph

37 Commits

Author SHA1 Message Date
Dimitri Fontaine
087d4d28cb Review website material, introduce pgloader cli operations. 2015-01-15 16:52:10 +01:00
Dimitri Fontaine
560c838d34 Improve documentation, readying for next release.
The docs now fully cover all supported source types, including COPY and
MSSQL, and expand some more on the command-line only operations for
pgloader.
2015-01-15 00:29:41 +01:00
Dimitri Fontaine
559e1c3348 Forgot to push the changes to the manpage. 2015-01-06 12:35:35 +01:00
Dimitri Fontaine
6d76bc57e3 Allow - from the command line to process from standard input.
Also augment the documentation with examples of bare stdin reading and
of advantages of the unix pipes to stream even remove archived content
down to PostgreSQL.
2014-12-27 21:20:40 +01:00
Dimitri Fontaine
f2bf5c4a62 Adjusting manpage text to fit github's markdown... 2014-12-27 17:09:37 +01:00
Dimitri Fontaine
44504542c9 Small fixes in the pgloader.1.md documentation. 2014-12-27 17:08:17 +01:00
Dimitri Fontaine
e45ab7f1e2 Add an EXAMPLES section to the man page. 2014-12-23 22:37:26 +01:00
Dimitri Fontaine
6eac0d9dd8 Implement --before and --after options on the command line.
That allows using SQL scripts to run before and after the main data
processing and loading done by pgloader when used only from the command
line.
2014-12-23 12:21:44 +01:00
Dimitri Fontaine
65c2043694 Improve pgloader usage from the command line.
Make it so that the following command line usages are accepted when
using pgloader without a command file:

 ./build/bin/pgloader ./test/sqlite/sqlite.db postgresql:///pgloader

 ./build/bin/pgloader --set "search_path='sakila'"  \
                      mysql://root@localhost/sakila \
                 postgresql:///sakila

 ./build/bin/pgloader --type csv                             \
                      --field id --field field               \
                      --with truncate                        \
                      --with "fields terminated by ','"      \
                      ./test/data/matching-1.csv             \
                      postgres:///pgloader?matching

It's now possible in most cases to just use command-line options, which
should make the entry bar to pgloader much lower.
2014-12-23 02:40:13 +01:00
Dimitri Fontaine
85cff5f993 Update the manpage from its source. 2014-12-17 10:12:40 +01:00
Dimitri Fontaine
073f012d1a Add support for SSL modes in the PG connection string, fix #137.
In passing, refactor the *pgconn- dynamic bindings in favor of directly
using the connection property list straight from the connection string
parser, processing it when necessary. That allows to make it simple to
add an internal :use-ssl property.
2014-12-16 18:45:43 +01:00
Dimitri Fontaine
22f4317a30 Add support for the CAST rule to SQLite sources.
This allows users to benefit from the same flexible machinery when using
SQLite as when using MySQL, and also allows to add some more default
cast rules too.
2014-10-13 00:52:55 +02:00
Gianni Ciolli
94ebc8967c Fix oversight in documentation. 2014-10-02 16:24:16 +02:00
Dimitri Fontaine
08fc7fd092 Square brackets around source field options are now mandatory. 2014-10-02 01:17:24 +02:00
Dimitri Fontaine
7cf7e714fc Implement the source date format option. 2014-10-02 01:03:24 +02:00
Dimitri Fontaine
ac55d71401 Rework CSV and Fixed files source fields options, see #116.
It's not possible to use a comma separator when using more than one
source field option at the same time, and for better readability the
options are to be found enclosed in squared brackets.

Also, it's now possible to spell out "from" and "for" keywords on the
source definitions, making it easier to read and maintain the load file,
as in this full example:

          (
           a from  0 for 10,
           b from 10 for  8,
           c from 18 for  8,
           d from 26 for 17 [null if blanks, trim right whitespace]
          )
2014-10-01 18:32:40 +02:00
Dimitri Fontaine
ea97fc4659 Implement a new source level filter: trim.
As seen in #116, it might be better for the users to be able to ask for
field trimming right in the source definition, like we do for processing
nulls.
2014-09-29 15:16:04 +02:00
Dimitri Fontaine
52e3371be8 Review default SQLite options. 2014-09-22 14:34:57 +02:00
Dimitri Fontaine
bf1ab9acd7 Document MySQL LOAD default WITH clause options. 2014-09-21 12:26:24 -05:00
Dimitri Fontaine
9c604f969b Rename --load into --load-lisp-file
To avoid wasting everybody's time when trying to debug --load
command.load, rename the option to be more explicit about what it does.
Also implement some basic guards in the form of testing that the
filename extension is part of a very short whitelist: .lisp, .cl, .lsp
and .asd.
2014-09-02 22:33:51 +02:00
Dimitri Fontaine
5213456b8f Update SQLite examples in the docs.
We were still using the old "drop tables" syntax...
2014-08-28 10:44:40 +02:00
Dimitri Fontaine
79f622234f Allow specifying the SQLite text encoding, fix #99. 2014-07-25 19:01:15 +02:00
Dimitri Fontaine
de910321ff Commit the formated manpage, see #98. 2014-07-24 19:05:01 +02:00
Dimitri Fontaine
368dd88b48 Implement GETENV facility for reading FROM and INTO clauses.
It might be important to be able to use the exact same pgloader commands
file but adapt its source and target depending on the environment where
the command is to be run (production, development, staging, etc).

Introduce the new sub-clause GETENV 'variable-name' to that effect.

The regression test facility that we have now isn't nearly sophisticated
enough to support this, so the feature isn't yet covered.
2014-07-24 18:28:59 +02:00
Dimitri Fontaine
ebef038c8f Document the LOAD FROM IXF command. 2014-07-17 16:59:12 +02:00
Dimitri Fontaine
f5fc5cce73 Review MySQL casts rules with auto_increment, fix #96. 2014-07-12 22:41:20 +02:00
Dimitri Fontaine
6a7f3c2417 Add some docs about oversized batches, fix #86. 2014-06-29 16:06:09 +02:00
Dimitri Fontaine
de4ff30acc Implement --summary to copy the output to a file, fix #68.
Given than redirecting a tty such as *terminal-io* isn't easy enough,
let's provide a way to copy the summary output to a file. Another way to
solve it would have been to output the summary to the main logs, but
that could have made the logs parsing more difficult that necessary.

Let's see how users like it...
2014-06-14 23:31:11 +02:00
Dimitri Fontaine
655937a958 Document default values for the connection string, see #74. 2014-06-10 12:02:10 +02:00
Dimitri Fontaine
a2370938b6 MATERIALIZE ALL VIEWS.
Complete the MySQL migration feature.
2014-05-26 18:03:50 +02:00
Dimitri Fontaine
e9e9e364b0 Add optional clauses USING FIELDS and TARGET COLUMNS. 2014-05-26 15:04:06 +02:00
Dimitri Fontaine
b17383fa90 Allow IN DIRECTORY sub-clause for the FILENAME MATCHING clause.
With this the user is now able to have a way about where the files are
going to be read and matched against the regular expression. It used not
to be necessary in the archive expansion mode, but is required now that
the feature is exposed in more cases.
2014-05-26 14:45:12 +02:00
Dimitri Fontaine
a0518f2e98 Document FILENAMES MATCHING option. 2014-05-26 11:08:10 +02:00
Dimitri Fontaine
c38798a4dd Implement BEFORE/AFTER LOAD EXECUTE 'filename'.
That allows using the same SQL files as usual when using pgloader, as it
even supports the \i and \ir psql features (and dollar quoting, etc).

In passing, refactor docs to avoid saying the same things all over the
place, which isn't a very good idea in a man page, at least as far
editing it is involved.
2014-05-04 23:04:45 +02:00
Dimitri Fontaine
fecae2c2d9 Implement --self-upgrade capacity.
As from now, to install a new version of pgloader when you have an older
one, say because there's that bug that got fixed meanwhile, all you need
to do is run

  $ git clone https://github.com/dimitri/pgloader.git /tmp/pgloader
  $ pgloader --self-upgrade /tmp/pgloader <options as usual>

Any Common Lisp developper using the product is already doing that many
times a day, it might prove useful for users to be able to hot-patch
themselves too, after all.
2014-05-03 00:25:44 +02:00
Dimitri Fontaine
24281fb679 Include the new version of the manpage, pre-compiled. 2014-04-29 11:54:37 +02:00
Nikhil Benesch
7ec2ca30e8 pgloader.1: include compiled man page for packaging convenience
Allows packaging systems like Homebrew to install manual pages
automatically for users without introducing a dependency on the manual
page build system.
2014-04-06 19:59:31 -04:00