Search code examples
azureazure-cosmosdbgremlindocument-database

Copy documents from one DocumentCollection to another?


In my Azure CosmosDB, that I use with the Gremlin API there is one database called graphdb with several {DocumentCollections}. I would like to copy a selected set of Vertices and Edges from one collection (graphdb) to another (Tintin).

My Azure CosmosDB

I managed to do this by transferring all data via the client, but it would be much easier if data stayed in Azure. Thus I tried some SQL in the Azure portal like:

SELECT *
INTO Tintin 
FROM graphdb;

However, this seems unsupported.


Solution

  • Now you cannot join multiple collections and you query violates this rule.

    But I think +1 for your idea, you should post it on https://feedback.azure.com/