-
Notifications
You must be signed in to change notification settings - Fork 136
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
Importing CSV to sqlite3 fails due to invalid command-line syntax #482
Comments
@giladarnold yes, please submit the patch, thanks. |
|
@kwmsmith this looks okay? |
Created pull request: #488 |
I Just got it working by replacing the filename with pandas.read_csv(filename) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When importing a CSV odo invokes sqlite3 with command-line arguments:
sqlite3 -nullvalue '' -separator , -cmd '.import "/path/to/csv/file" tablename' /path/to/db/file
However, current sqlite3 (version 3.6.20) does not support a
-cmd
option. Instead, the invocation should look like this:sqlite3 -nullvalue '' -separator , /path/to/db/file '.import "/path/to/csv/file" tablename'
I patched odo/backends/sql_csv.py:compile_from_csv_sqlite() accordingly and it works like a charm. Happy to submit the patch if that'll speed things up. Please advise, thanks!
The text was updated successfully, but these errors were encountered: