From ebef038c8f6335a739c1afccf22ad61c882d203e Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Thu, 17 Jul 2014 16:59:12 +0200 Subject: [PATCH] Document the LOAD FROM IXF command. --- pgloader.1 | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++ pgloader.1.md | 43 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+) diff --git a/pgloader.1 b/pgloader.1 index 59d8a80..4e0cbd4 100644 --- a/pgloader.1 +++ b/pgloader.1 @@ -804,6 +804,64 @@ This options expects as its value the possibly qualified name of the table to cr . .IP "" 0 +. +.IP "" 0 +. +.SH "LOAD IXF" +This command instructs pgloader to load data from an IBM \fBIXF\fR file\. Here\'s an example: +. +.IP "" 4 +. +.nf + +LOAD IXF + FROM data/nsitra\.test1\.ixf + INTO postgresql:///pgloader?nsitra\.test1 + WITH truncate, create table + + BEFORE LOAD DO + $$ create schema if not exists nsitra; $$, + $$ drop table if exists nsitra\.test1; $$; +. +.fi +. +.IP "" 0 +. +.P +The \fBixf\fR format command accepts the following clauses and options: +. +.IP "\(bu" 4 +\fIFROM\fR +. +.IP +Filename where to load the data from\. This support local files, HTTP URLs and zip files containing a single ixf file of the same name\. Fetch such a zip file from an HTTP address is of course supported\. +. +.IP "\(bu" 4 +\fIWITH\fR +. +.IP +When loading from a \fBIXF\fR file, the following options are supported: +. +.IP "\(bu" 4 +\fItruncate\fR +. +.IP +When this option is listed, pgloader issues a \fBTRUNCATE\fR command against the PostgreSQL target table before reading the data file\. +. +.IP "\(bu" 4 +\fIcreate table\fR +. +.IP +When this option is listed, pgloader creates the table using the meta data found in the \fBDBF\fR file, which must contain a list of fields with their data type\. A standard data type conversion from DBF to PostgreSQL is done\. +. +.IP "\(bu" 4 +\fItable name\fR +. +.IP +This options expects as its value the possibly qualified name of the table to create\. +. +.IP "" 0 + . .IP "" 0 . diff --git a/pgloader.1.md b/pgloader.1.md index ad57075..5d63b05 100644 --- a/pgloader.1.md +++ b/pgloader.1.md @@ -700,6 +700,49 @@ The `dbf` format command accepts the following clauses and options: This options expects as its value the possibly qualified name of the table to create. +## LOAD IXF + +This command instructs pgloader to load data from an IBM `IXF` file. Here's +an example: + + LOAD IXF + FROM data/nsitra.test1.ixf + INTO postgresql:///pgloader?nsitra.test1 + WITH truncate, create table + + BEFORE LOAD DO + $$ create schema if not exists nsitra; $$, + $$ drop table if exists nsitra.test1; $$; + +The `ixf` format command accepts the following clauses and options: + + - *FROM* + + Filename where to load the data from. This support local files, HTTP + URLs and zip files containing a single ixf file of the same name. Fetch + such a zip file from an HTTP address is of course supported. + + - *WITH* + + When loading from a `IXF` file, the following options are supported: + + - *truncate* + + When this option is listed, pgloader issues a `TRUNCATE` command + against the PostgreSQL target table before reading the data file. + + - *create table* + + When this option is listed, pgloader creates the table using the + meta data found in the `DBF` file, which must contain a list of + fields with their data type. A standard data type conversion from + DBF to PostgreSQL is done. + + - *table name* + + This options expects as its value the possibly qualified name of the + table to create. + ## LOAD ARCHIVE This command instructs pgloader to load data from one or more files contained