augustin-s
augustin-s

Reputation: 683

Arangoimp sporadically throws error "expecting array"

when doing large json imports with arangoimp (using ArangoDB 2.4.0), sporadically a warning comes up:

2015-01-15T11:30:30Z [1268] WARNING at position 22213: invalid JSON type (expecting array)
  1. The encording lines (here 22213) contents a proper json object. Is there a way to let arangoimp print for which attribute it expects an array?
  2. As we are using schemeless documents, why is arangoimp insisting in getting an array anyway?
  3. If this is a WARNING why is it reported as error at the end?

    created: 25416 errors: 297 total: 25713

The warned documents indeed where not imported.

Upvotes: 1

Views: 375

Answers (1)

stj
stj

Reputation: 9097

I have just pushed a change that will improve diagnostics for these cases: https://github.com/triAGENS/ArangoDB/commit/d7fa7e7a928d3d998fc8dddb372d07417c3d6646

It will produce better error messages, print the offending document and may also print the offending line in case of parse errors. It also addresses the issue that warnings and errors are effectively the same when importing. So it now prints "warnings/errors" instead of just "errors".

Upvotes: 2

Related Questions