1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
LOAD CSV
FROM INLINE with encoding 'ascii'
INTO postgresql:///pgloader
TARGET TABLE jordane
WITH truncate,
fields terminated by '|',
fields not enclosed,
fields escaped by backslash-quote
SET work_mem to '128MB',
standard_conforming_strings to 'on'
BEFORE LOAD DO
$$ drop table if exists jordane; $$,
$$ CREATE TABLE jordane
(
"NOM" character(20),
"PRENOM" character(20)
)
$$;
BORDET|Jordane
BORDET|Audrey
LASTNAME|"opening quote
BONNIER|testprenombe~aucouptroplong
JOURDAIN|héhé¶
|