-
Notifications
You must be signed in to change notification settings - Fork 27
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
feat: expose load from csv file via Python driver #504
Comments
How about adding support to |
We're looking for the fastest/most optimal way to load data into Databend. If we have a local CSV file, what is the best option? Currently we're pushing the file to cloud storage and executing COPY INTO statement. |
If you are just seeking to load files, then you may try out with bendsql: bendsql --query='INSERT INTO http_books_02 VALUES;' --format=csv --data=@cli/tests/data/books.csv
# or with STDIN
bendsql --query='INSERT INTO http_books_01 VALUES;' --format=csv --data=@- <cli/tests/data/books.csv
# or with more options
bendsql \
--query='INSERT INTO http_ontime_03 VALUES;' \
--format=csv \
--format-opt="compression=gzip" \
--format-opt="skip_header=1" \
--data=@cli/tests/data/ontime_200.csv.gz |
Yep, that's good for a test. How can I replicate with Python driver, passing the file name? |
We will add support for python driver in next release. |
Currently, only exposed is to load a data array via
stream_load
method on Python driver which involves reading the data from file and passing into the methodIt would be good to have a method to load from CSV file with options, and/or the ability to stage a file with the driver bindings.
The text was updated successfully, but these errors were encountered: