Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

No (real) need for a script, you can import in the sqlite3 commandline. First make the table, then set a .separator, then .import the file. I am not sure how performant it is though, so creating transactions outside might be better in some cases.


The sqlite3 .import command does not handle quoted csv values.

"Doe, John", 1234 Pine St, Springfield

That would be imported as 4 fields, not 3.


Used to be true. But recent versions of SQLite fix this.


csv2sqlite actually generates the table definitions for you, so I think that's a big improvement when you just downloaded a CSV file with 30 columns in it and need to quickly verify it or extract some data from it.

Also supports parsing multiple CSV files at once, so you can easily do joins.


Depends on how often you have to do this... if it saves time, I'm in




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: