2

If I want to connect to CosmosDB which is created with Gemlin API is works fine with Gremlin.Net

But the Gremlin.NET API is designed to handle on Graph. I think because the Neo4j and other Graph databases can handle one graph in one time. And I want a new a Graph in CosmosDB I can create it from Azure portal.

But How can I create a new Graph from Code? Of course when I connect to same CosmosDB instance with DocumentDB API, then I Can create a new Collection which is Graph in Cosmos. But this is not safe for some reason:

  1. Not recommended to Connect to Cosmos with Different API-s.
  2. When I create a Graph from Azure Portal, maybe there is some other initialization code is running, other than just create an empty collection

Is there a safe way to create Graph In CosmosDB from Code?

1 Answer 1

1

The initialization code only runs when you create a Cosmos DB account with Gremlin API. The initialization code creates a Gremlin webseocket server endpoint which is specific to Gremlin API.

After that, creating a Graph is equivalent to creating a collection/container using the Document DB API.

Please send us an email at [email protected].

Jayanta

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.