Arangoexport – a tool for exporting data from ArangoDB
With the release of the initial alpha of ArangoDB version 3.2 we also include the preview of the new export tool arangoexport. Alpha2 of ArangoDB 3.2 can be downloaded here. An export functionality was initially requested by one of our community members to view an ArangoDB graph view the Cytoscape visualizer.
Arangoexport is capable of exporting a graph or certain collections of a graph to xgmml, Cytoscape’s graph format. But arangoexport is not limited to this. It can also generate JSON or JSONL data exports of arbitrary collections.
For example, to export the collections collectionOne
and collectionTwo
to JSON just do:
arangoexport --type json --collection collectionOne --collection collectionTwo
If you would like to store the export data in a different directory just use the option:
--output-directory /my/path/to/export
The export type json
will produce one big JSON array where every line is one document.
Export type jsonl
will output line-wise JSON. So every line contains one document represented as standalone JSON.
JSONL files can be imported with arangoimp:
arangoimp --file "collectionOne.jsonl" --type jsonl --collection collectionOne
But the most anticipated feature is exporting a graph to xgmml. To do so just call arangoexport with type xgmml
and a graph name:
arangoexport --type xgmml --graph-name myGraph
You can also specify an unnamed graph by additionally passing all collections that the graph consists of:
arangoexport --type xgmml --graph-name myGraph --collection vertexCollectionOne --collection vertexCollectionTwo --collection edgeCollectionOne
For xgmml there are two more options: one to suppress output of attributes to generate a smaller xgmml file, and the second is to select a different label attribute.
Also visit our documentation for arangoexport or open an issue if your super duper format is missing and should be added.
For questions please visit our Community Slack Channel.
Get the latest tutorials, blog posts and news: