Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

csvsql with timestamps doesn't work for sqlite #133

Closed
haridsv opened this issue Dec 14, 2011 · 2 comments
Closed

csvsql with timestamps doesn't work for sqlite #133

haridsv opened this issue Dec 14, 2011 · 2 comments
Labels

Comments

@haridsv
Copy link
Contributor

haridsv commented Dec 14, 2011

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.

@onyxfish
Copy link
Collaborator

Thanks for the bug report. It sounds like python-dateutil may be getting flummoxed by that particular format. I'll take a closer look at it when I have a chance.

@haridsv
Copy link
Contributor Author

haridsv commented Jan 17, 2012

Thank you, I can verify that the original problem is fixed.

lcorbasson pushed a commit to lcorbasson/csvkit that referenced this issue Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants