Can we rename vertex/edge labels in a gremlin graph in Azure Cosmos DB

Akshi_vr 21 Reputation points

We have already created thousands of graphs.Recently the names of the vertex label and edge label was renamed to another name.Can I know if we can rename directly through any query?? Or is there an optimal way of creating new graph with the the new vertex name with all the properties included in the old graph??

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,437 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ShaktiSingh-MSFT 13,271 Reputation points Microsoft Employee

    Hi @Akshi_vr ,

    Thanks for posting question in Microsoft Q&A platform and for using Azure services.

    As I understand about this question, you want to rename vertex/edges in Gremlin graph of Cosmos DB.

    Unfortunately, we could not rename the labels.

    However, as per your ask for creating new graph with new vertex/edges with all properties included from old graph could be tried using external custom code.

    Please take a look at the multi-label feature if could be helpful in this case: reference or Tinkerpop link for Moving and Edge where we use sideEffect() to transfer properties from edge1 to edge2.

    Similar links for Gremlin ask: how-do-i-update-an-edge-label-in-gremlin

    Hope this will help. Please let us know if any further queries.


    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you.
      Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    0 comments No comments