pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sbob <sbob@quadratum-braccas.com>
To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: OT: help with pgloader
Date: Tue, 9 Jul 2024 16:36:33 -0600
Message-ID: <85b3aab6-91ef-496e-88d5-047f170e1a06@quadratum-braccas.com> (raw)

All;


I created a few tables with pgbench, then I did this:

1)  copied the data from pgbench_accounts to a data file with a pipe '|' 
delimiter:

  copy pgbench_accounts to '/var/lib/pgsql/copy/pgbench_accounts.dat' 
delimiter ' ;


2) installed pgloader

# dnf -y install pgloader


3) deleted all data from the pgbench_accounts table:

DELETE FROM pgbench_accounts ;


4) created a copy.load file that looks like this:

$ cat copy.load
LOAD COPY
  FROM copy://./pgbench_accounts3.dat
  INTO postgresql://localhost/postgres
TARGET TABLE public.pgbench_accounts
  WITH delimiter '|'


However pgloader bombs on the delimiter (see below)

Can someone point me in the right direction ?


Thanks in advance




pgloader run:


$ pgloader copy.load
2024-07-09T23:26:21.005000+01:00 LOG pgloader version "3.6.7~devel"
2024-07-09T23:26:21.006000+01:00 LOG Data errors in '/tmp/pgloader/'
2024-07-09T23:26:21.006000+01:00 LOG Parsing commands from file 
#P"/var/lib/pgsql/copy/copy.load"
KABOOM!
ESRAP-PARSE-ERROR: At

   TARGET TABLE public.pgbench_accounts
    WITH delimiter '|'

                      ^ (Line 5, Column 19, Position 141)

In context COMMAND:

While parsing COMMAND. Expected:

      the character Tab
   or the character Newline
   or the character Return
   or the character Space
   or the character , (COMMA)
   or the string "--"
   or the string "/*"
   or the character ; (SEMICOLON)
   or the string "after"
   or the string "before"
   or the string "set"
   or the string "with"
An unhandled error condition has been signalled: At

   TARGET TABLE public.pgbench_accounts
    WITH delimiter '|'

                      ^ (Line 5, Column 19, Position 141)

In context COMMAND:

While parsing COMMAND. Expected:

      the character Tab
   or the character Newline
   or the character Return
   or the character Space
   or the character , (COMMA)
   or the string "--"
   or the string "/*"
   or the character ; (SEMICOLON)
   or the string "after"
   or the string "before"
   or the string "set"
   or the string "with"




What I am doing here?

At

   TARGET TABLE public.pgbench_accounts
    WITH delimiter '|'

                      ^ (Line 5, Column 19, Position 141)

In context COMMAND:

While parsing COMMAND. Expected:

      the character Tab
   or the character Newline
   or the character Return
   or the character Space
   or the character , (COMMA)
   or the string "--"
   or the string "/*"
   or the character ; (SEMICOLON)
   or the string "after"
   or the string "before"
   or the string "set"
   or the string "with"









view thread (2+ messages)  latest in thread

Message-ID: <85b3aab6-91ef-496e-88d5-047f170e1a06@quadratum-braccas.com>
Permalink:  ../85b3aab6-91ef-496e-88d5-047f170e1a06@quadratum-braccas.com/
Also on:    postgresql.org/message-id/85b3aab6-91ef-496e-88d5-047f170e1a06@quadratum-braccas.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: sbob@quadratum-braccas.com, pgsql-admin@lists.postgresql.org
  Subject: Re: OT: help with pgloader
  In-Reply-To: <85b3aab6-91ef-496e-88d5-047f170e1a06@quadratum-braccas.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox