mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-07 23:07:00 +02:00
13 lines
374 B
Fish
13 lines
374 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
|
|
|
|
before load do
|
|
$$ drop table if exists matching; $$,
|
|
$$ create table matching(id int, field text); $$;
|