pgloader/test/csv-filename-pattern.load
2014-05-26 15:04:06 +02:00

13 lines
376 B
Fish

load csv
from all filenames matching ~<matching.*csv$>
in directory 'data'
having fields (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); $$;