Inserting between databases

23 views
Skip to first unread message

JPatrick Davenport

unread,
Aug 2, 2015, 12:16:44 PM8/2/15
to ArangoDB
Hello,
Perhaps I'm missing it, but is there a way to insert an AQL query from one database into another?

Thanks,
JD

CoDEmanX

unread,
Aug 2, 2015, 5:01:43 PM8/2/15
to ArangoDB
You mean you want to insert the documents of a collection in database A to a collection in database B?
I don't think that's possible. Cross-collection IO within the same database works however.

If you want to copy to another database, try arangodump and arangoimp.

Jan

unread,
Aug 3, 2015, 2:44:19 AM8/3/15
to ArangoDB
Hi JD,

query from one database and inserting into another within the same AQL query is not supported. An AQL query will always be executed in the context of a single database.
To query from one database and insert into another, the options are to have two connections open in a client application, and use one for query and the other for insertion.
Or to use arangodump / arangorestore as @CoDEmanX suggested.

Best regards
J
Reply all
Reply to author
Forward
0 new messages