Updating Documents with an Arangoimp Import
Inspired by the feature request in Github issue #1298, we added
replace support for ArangoDB’s import facilities.
This extends ArangoDB’s HTTP REST API for importing documents plus the
arangoimp binary so they can not only insert new documents but also update existing ones.
Inserts and updates can also be mixed in a single import run. What exactly will happen is configurable by setting arangoimp’s new command-line option
error will be reported if a document already exists. This behavior can be changed by setting
--on-duplicate to a value of
ignore. Here is an example result of an import with duplicated keys:
> arangoimp --file data.json --collection users --on-duplicate update created: 1 warnings/errors: 0 updated/replaced: 2 ignored: 0
So, if you want to aggregate data from several data files, you can try the new import command-line option
Get the latest tutorials, blog posts and news: