mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-06 22:37:02 +02:00
23 lines
543 B
Fish
23 lines
543 B
Fish
LOAD CSV
|
|
FROM 'this/file/does/not/exists.csv' WITH ENCODING latin1
|
|
(a, b, c, d, e)
|
|
INTO postgresql:///pgloader?csv.nofile
|
|
|
|
WITH truncate,
|
|
skip header = 1,
|
|
fields optionally enclosed by '"',
|
|
fields escaped by double-quote,
|
|
fields terminated by ','
|
|
|
|
BEFORE LOAD DO
|
|
$$ create schema if not exists csv; $$,
|
|
$$ create table if not exists csv.nofile
|
|
(
|
|
a text,
|
|
b text,
|
|
c text,
|
|
d text,
|
|
e text
|
|
);
|
|
$$;
|