-
-
Notifications
You must be signed in to change notification settings - Fork 530
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Thanks to the work at AccelerationNet/cl-csv#12 we can now use the main branch of cl-csv again.
- Loading branch information
Showing
4 changed files
with
26 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
LOAD CSV | ||
FROM INLINE | ||
INTO postgresql:///pgloader?nulls (f1, f2, f3) | ||
WITH truncate, | ||
trim unquoted blanks, | ||
fields optionally enclosed by '"', | ||
fields escaped by double-quote, | ||
fields terminated by ',' | ||
|
||
BEFORE LOAD DO | ||
$$ drop table if exists nulls; $$, | ||
$$ create table if not exists nulls (id serial, f1 text, f2 text, f3 text); $$; | ||
|
||
"quoted empty string","","should be empty string" | ||
"no value between separators",,"should be null" | ||
"quoted blanks"," ","should be blanks" | ||
"unquoted blanks", ,"should be null" | ||
"unquoted string",no quote,"should be 'no quote'" | ||
"quoted separator","a,b,c","should be 'a,b,c'" | ||
"trim extra blanks", test string , "should be 'test string'" |