Be careful! This highly voted comment is misleading The question is tricky and the correct answer is definately "B" (use SQL-like statement to query a graph db)
Atention folks. The question is how you query and not what is needed to connect Graph to Cosmos DB. Once is connected, you use Cosmos DB to perform queries. In my HUMBLE opinion, the given answer is right
You are correct! The link provided, at the very bottom, has a very clear example, that you use a SQL-like statement to query a graph db and returns a JSON doc as results. The answer is correct.
Azure Cosmos DB supports multiple APIs. For graph databases, it uses the Gremlin API, which is based on the Apache TinkerPop Gremlin language used for traversing and querying graph structures (nodes and edges).
If you want to query a graph database in Azure Cosmos DB, the option you choose is B. as nodes and edges using Gremlin because Gremlin is specifically designed to work with databases in mapping rules.!
By using the Gremlin API, you can query a graph database in Azure Cosmos DB using the Gremlin query language. Gremlin is a graph traversal language and the primary query language for graph databases.
To query a graph database in Azure Cosmos DB using the Gremlin API, you would typically use a Gremlin console or a Gremlin client library. Here's a general outline of how you would query a graph database in Azure Cosmos DB using the Gremlin API:
Connect to the Cosmos DB account: You would need to provide the connection details for your Azure Cosmos DB account, including the URI and authentication keys or tokens.
Instantiate a Gremlin client: Use a Gremlin client library for your programming language of choice (e.g., Java, Python, .NET) to establish a connection to the Cosmos DB account.
Execute Gremlin queries: Use the methods provided by the Gremlin client library to execute Gremlin queries against the graph database in Azure Cosmos DB. These queries can traverse the graph, retrieve vertices (nodes), edges (relationships), and perform various graph operations. Process the results returned by the Gremlin queries as needed for your application logic.
" For example, you can use a document collection to store graph data side by side with documents, and use both SQL queries over JSON and Gremlin queries to query the collection." Answer is correct.
You can query a graph database in Azure Cosmos DB as nodes and edges by using the Gremlin Language. Gremlin is a popular query language for graph databases, and it allows you to traverse and manipulate the graph structure of your data.
As per Chat GPT: Azure Cosmos DB supports querying graph databases using the Gremlin API. Gremlin is a graph traversal language that allows you to traverse and manipulate a graph database, and it is supported by Azure Cosmos DB. You can use the Gremlin API to perform graph queries, create vertices and edges, and traverse the graph to find paths and relationships between different nodes. The Gremlin API supports multiple programming languages, including Java, Python, and .NET, and it is widely used in graph database applications.
wrong...Gremlin
The Gremlin API is used for graph databases. The MongoDB API stores data in the BSON format. The Table API is used to retrieve key/value pairs. The Cassandra API is used to retrieve tabular data.
This section is not available anymore. Please use the main Exam Page.DP-900 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
jasu
Highly Voted 4 years, 8 months agovhx
4 years, 7 months agocasualcrackers
3 years agoMinimizeEfforts
3 years, 3 months agoEBAN
Highly Voted 4 years, 6 months agoOmar_Alfaqih
3 years, 10 months agoAbhishek_89
2 years, 11 months agolebigmac
4 years, 2 months agoRoy34
Most Recent 2 weeks, 6 days agoJxx80i
6 months, 2 weeks agoJxx80i
6 months, 2 weeks agoAbhishek17
10 months, 1 week agoYomzie
1 year, 2 months agoGoouter
1 year, 3 months agoikramus
1 year, 3 months agoKemsmems
1 year, 5 months agoArshxd
1 year, 6 months agoLou__
1 year, 7 months agoPrince9598
1 year, 7 months agormeng
1 year, 8 months agoKraken84
1 year, 8 months agoakhil5432
1 year, 9 months agoXtraWest
2 years, 1 month agochiiiweiii
2 years, 1 month agozerone72
1 year, 8 months agofacilitator
2 years, 2 months ago