pgloader/test/csv-filename-pattern.load
Dimitri Fontaine 36805afc64 Fix *csv-path-root* at run-time.
When using LOAD CSV it's possible to load from filename matching a
regular expression, but for that to work the *csv-path-root* needs to be
properly setup at run-time.
2014-05-26 11:01:19 +02:00

11 lines
329 B
Fish

load csv
from all filenames matching ~<data/matching.*csv$> (id, field)
into postgresql:///pgloader?matching
with fields optionally enclosed by '"',
fields terminated by ',',
truncate
before load do
$$ drop table if exists matching; $$,
$$ create table matching(id int, field text); $$;