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"