pyArango icon indicating copy to clipboard operation
pyArango copied to clipboard

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

Open GoodFaithParadigm8 opened this issue 6 years ago • 1 comments

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.

GoodFaithParadigm8 avatar Dec 22 '19 22:12 GoodFaithParadigm8

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")

NiklasBeierl avatar Dec 26 '20 15:12 NiklasBeierl