Re: Is there a PostgreSQL utility that is similiar to Oracles sql loader?

From: Dimitri Fontaine <dim(at)dalibo(dot)com>
To: pgsql-general(at)postgresql(dot)org, stafford(at)marine(dot)rutgers(dot)edu
Subject: Re: Is there a PostgreSQL utility that is similiar to Oracles sql loader?
Date: 2006-11-17 21:28:27
Message-ID: 200611172228.27609.dim@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Le vendredi 17 novembre 2006 22:07, Wm.A.Stafford a écrit :
> We are trying to load our PostgreSQL DB with data that contains many
> corrupted rows. I recall that sql loader will skip corrupted rows and
> keep going. We are using the PostgreSQL copy command to load and it
> just gives up when the first corrupted row is encountered.

pgloader is the tool you're looking for, it will give you reject log file and
reject data file, and has many useful options, as for example:
-p, --pedantic pedantic mode, stop processing on warning
-n, --dry-run simulate operations, don't connect to the db
-T, --truncate truncate tables before importing data
number of input lines to process
-F FROMCOUNT, --from=FROMCOUNT
number of input lines to skip
-I FROMID, --from-id=FROMID
wait for given id on input to begin

Pedantic mode makes pgloader behave as COPY command, damn usefull in debug
mode or if you have the opportunity to correct data.

As I just gave you information to download code and debian package, I won't
insist that much on it :)
--
Dimitri Fontaine
http://www.dalibo.com/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Devrim GUNDUZ 2006-11-17 21:47:03 Re: PostgreSQL RPMs
Previous Message Madison Kelly 2006-11-17 21:21:39 Re: Is there a PostgreSQL utility that is similiar to Oracles