8000 Bulk Import of List doesn't work · Issue #461 · arangodb/arangojs · GitHub
[go: up one dir, main page]

Skip to content

Bulk Import of List doesn't work #461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TimMensch opened this issue Jun 1, 2017 · 3 comments
Closed

Bulk Import of List doesn't work #461

TimMensch opened this issue Jun 1, 2017 · 3 comments
Labels
Bug A code defect that needs to be fixed. duplicate This issue is already addressed by another issue.

Comments

@TimMensch
Copy link

I was having issues with bulk import, and I finally gave up on my code and used the snippet from the docs:

    collection.import(
        [// array stream with header
            [ 'username', 'password' ], // keys
            [ 'admin', 'hunter2' ], // row 1
            [ 'jcd', 'bionicman' ], // row 2
            [ 'jreyes', 'amigo' ],
            [ 'ghermann', 'zeitgeist' ]
        ]
    )

I get:

ArangoError: expecting a valid JSON array in the request. got: Expecting EOF

I can do the equivalent query using curl without issue, and I've looked at the generated query and I don't see what's different compared to the raw query that curl generates, so I'm going to throw up my hands for now and just pass in an array of objects (which does work).

@dimahav
Copy link
dimahav commented Jul 3, 2017

Same problem for me.

@Kustopher
Copy link

same here

this syntax works fine:
[
{key1: value1, key2: value2}, // document 1
{key1: value1, key2: value2}, // document 2
...
]

this syntax doesn't work at all:
[
['key1', 'key2'], // key names
[value1, value2], // document 1
[value1, value2], // document 2
...
]
i get the error response:
(node:11676) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): ArangoError: expecting a valid JSON array in the request. got: Expecting EOF

8000
@pluma pluma added the Bug A code defect that needs to be fixed. label Nov 29, 2017
@pluma
Copy link
Contributor
pluma commented Mar 6, 2018

I'm currently waiting for clarification of the correct behaviour of the ArangoDB import API. See #496 for details.

@pluma pluma added the duplicate This issue is already addressed by another issue. label Mar 6, 2018
@pluma pluma closed this as completed in 024edac Aug 16, 2018
pluma added a commit that referenced this issue Aug 27, 2018
Fixes #461. Fixes #496.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A code defect that needs to be fixed. duplicate This issue is already addressed by another issue.
Projects
None yet
Development

No branches or pull requests

4 participants
0