ArangoDB-Community / pyArango

Python Driver for ArangoDB with built-in validation
https://pyarango.readthedocs.io/en/latest/
Apache License 2.0
238 stars 90 forks source link

[ question ] - How to perform file upload using pyArango? #165

Open GoodFaithParadigm8 opened 4 years ago

GoodFaithParadigm8 commented 4 years ago

Could you give an example of how to perform a file upload given a specific cli command?

ex: arangoimport --file "wiki_movie_plots_deduped.csv" --type csv --server.database arangoml --create-collection --collection "movies"

This would be a useful feature. Thanks.

NiklasBeierl commented 3 years ago

Arangoimport is well documented here It seems like your original data is in csv format, arangoimport seems to only accept json at this point. If you are familiar with python and the pandas, the conversion would be relatively straight-forward with to_json. The code should boil down to this:

import pandas
my_data = pandas.read_csv("./path/to/csv.csv")
my_data.to_json("./outfile.json")