3 ms·
the .import command used for actually loading the CSV is kinda picky about your CSVs being well-formatted. I don't think it supports embedded newlines at all.
by eli 4y ago
the .import command used for actually loading the CSV is kinda picky about your CSVs being well-formatted. I don't think it supports embedded newlines at all.
- simonw 4y agoI just tested it against a CSV file with newlines that were wrapped in double quotes and it worked correctly. I used this CSV file: https://til.simonwillison.net/tils/til.csv?_stream=on&_size=max https://til.simonwillison.net/tils/til.csv?_stream=on&_size=... And this query: sqlite3 :memory: -cmd '.mode csv' -cmd '.import til.csv til' \ -cmd '.mode json' 'select * from til limit 1' | jq
- eli 4y agoNeat! I guess it got fixed in the, uh, decade or so since I last tried