onyxfish/csvkit — Issue #133: csvsql with timestamps doesn't work for sqlite
Author: haridsv
Created: 2011-12-14 01:09:40+00:00
State: open

If you have a file named t.csv with timestamps, like this:

time
2011-12-13 23:43:52.684
2011-12-13 23:43:52.563

and run csvsql like this:

$ csvsql --db sqlite:///test.db --table t --insert t.csv

You get the below error:

SQLite DateTime type only accepts Python datetime and date objects as input.

It is also strange that it takes more than 5 minutes to give this error, on a file containing 4500 lines with 35 or so columns (one which is the time). The process consumes 100% cpu during this time.