I am having a hard time getting pgloader to work while trying to use the TARGET COLUMNS
optional arguments.
LOAD CSV
FROM INLINE
HAVING FIELDS
(
npi,
...
)
INTO postgresql://user:pass!n@pg2/nadb?tablename=tempload
(
npi
)
WITH skip header = 1,
fields optionally enclosed by '"',
fields escaped by double-quote,
fields terminated by ','
SET work_mem to '64MB'
BEFORE LOAD EXECUTE
tempload.sql;
If I don't use the target columns then it works just fine. tempload
has the exact same columns as data.csv
.
Everytime i run it it hangs up at this point:
2016-06-09T17:17:33.749000-05:00 DEBUG
select i.relname,
n.nspname,
indrelid::regclass,
indrelid,
indisprimary,
indisunique,
pg_get_indexdef(indexrelid),
c.conname,
pg_get_constraintdef(c.oid)
from pg_index x
join pg_class i ON i.oid = x.indexrelid
join pg_namespace n ON n.oid = i.relnamespace
left join pg_constraint c ON c.conindid = i.oid
where indrelid = 'tempload'::regclass
I'm at a total loss. Like I said, it works fine if I don't use TARGET COLUMNS
, so I really don't believe it is the data.
I get the same thing with release 3.2
and the docker image.