mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-07 23:07:00 +02:00
More than the syntax and API tweaks, this patch also make it so that a multi-file specification (using e.g. ALL FILENAMES IN DIRECTORY) can be loaded with several files in the group in parallel. To that effect, tweak again the md-connection and md-copy implementations.
16 lines
423 B
Fish
16 lines
423 B
Fish
load csv
|
|
from all filenames matching ~<matching.*csv$>
|
|
in directory 'data'
|
|
having fields (id, field)
|
|
into postgres:///pgloader?matching
|
|
|
|
with fields optionally enclosed by '"',
|
|
fields terminated by ',',
|
|
truncate,
|
|
workers = 8,
|
|
concurrency = 1
|
|
|
|
before load do
|
|
$$ drop table if exists matching; $$,
|
|
$$ create table matching(id int, field text); $$;
|