When trying to import data into ArangoDB from a JSON or CSV file using the arangoimp binary, there is always the chance that the target collection does not yet exist.
In order to create a missing target collection arangoimp for long has
provided the option
1 2 3 4
However there hasn’t been a way of specifying the type for the target collection, so the new collection was always created as document collection.
To import data into an edge collection, the target collection needed to be created by another means, e.g. by using the ArangoShell. It would have been more handy if arangoimp were able to create edge collections too.
2.8 finally adds that feature, and it’s simple to use: to create an edge collection
if the target collection does not exist, append the
option when invoking arangoimp:
1 2 3 4 5