I have a tsv (tab separated file) that I would like to import with sqlite3. Does someone know a clear way to do it?
I have installed sqlite3, but not created any database or tables yet.
I've tried the command
.import /path/filename.tsv my_new_table
but it gives me the error: no such table: my_new_table.
However, from what I'd read it should create the table automatically if it does't exist. Does it mean I need to create and use a database first, or is there another trick to importing a .tsv file into sqlite?
.separator "\t"
means that sqlite will still use csv-style rules for interpreting quotation marks, which probably isn't what you want. A better option is to use thetabs
mode described in adius's answer. – Leeannaleeanne