Skip to content

Commit 9fe43a3

Browse files
Merge pull request #265287 from seesharprun/cosmos-revamp-faq
Cosmos DB | Revamp FAQ
2 parents d3d0f68 + 4c6fec4 commit 9fe43a3

File tree

22 files changed

+515
-511
lines changed

22 files changed

+515
-511
lines changed

articles/cosmos-db/.openpublishing.redirection.cosmos-db.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6260,6 +6260,26 @@
62606260
"redirect_url": "/azure/cosmos-db",
62616261
"redirect_document_id": false
62626262
},
6263+
{
6264+
"source_path_from_root": "/articles/cosmos-db/mongodb/mongodb-faq.yml",
6265+
"redirect_url": "/azure/cosmos-db/mongodb/faq",
6266+
"redirect_document_id": false
6267+
},
6268+
{
6269+
"source_path_from_root": "/articles/cosmos-db/cassandra/cassandra-faq.yml",
6270+
"redirect_url": "/azure/cosmos-db/cassandra/faq",
6271+
"redirect_document_id": true
6272+
},
6273+
{
6274+
"source_path_from_root": "/articles/cosmos-db/gremlin/gremlin-api-faq.yml",
6275+
"redirect_url": "/azure/cosmos-db/gremlin/faq",
6276+
"redirect_document_id": true
6277+
},
6278+
{
6279+
"source_path_from_root": "/articles/cosmos-db/table/table-api-faq.yml",
6280+
"redirect_url": "/azure/cosmos-db/table/faq",
6281+
"redirect_document_id": true
6282+
},
62636283
{
62646284
"source_path_from_root": "/articles/cosmos-db/vector-search.md",
62656285
"redirect_url": "/azure/cosmos-db/vector-database",

articles/cosmos-db/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
items:
66
- name: Welcome to Azure Cosmos DB
77
href: introduction.md
8+
- name: FAQ
9+
href: faq.yml
810
- name: Try Azure Cosmos DB free
911
href: try-free.md
1012
- name: Choose an API

articles/cosmos-db/cassandra/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
- name: Tokens and the Token function
1414
href: tokens.md
1515
- name: FAQ
16-
href: cassandra-faq.yml
16+
href: faq.yml
1717
- name: Quickstarts
1818
items:
1919
- name: Java v4

articles/cosmos-db/cassandra/cassandra-faq.yml renamed to articles/cosmos-db/cassandra/faq.yml

Lines changed: 68 additions & 67 deletions
Large diffs are not rendered by default.

articles/cosmos-db/faq.yml

Lines changed: 80 additions & 180 deletions
Large diffs are not rendered by default.

articles/cosmos-db/gremlin/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- name: Wire protocol support
88
href: support.md
99
- name: FAQ
10-
href: gremlin-api-faq.yml
10+
href: faq.yml
1111
- name: Quickstarts
1212
items:
1313
- name: Console
Lines changed: 39 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -1,149 +1,80 @@
11
### YamlMime:FAQ
22
metadata:
3-
title: Frequently asked questions about the API for Gremlin in Azure Cosmos DB
4-
description: Get answers to frequently asked questions about the API for Gremlin in Azure Cosmos DB
3+
title: Frequently asked questions
4+
titleSuffix: Azure Cosmos DB for Apache Gremlin
5+
description: Get answers to frequently asked questions about Azure Cosmos DB for Apache Gremlin.
6+
author: seesharprun
7+
ms.author: sidandrews
8+
ms.reviewer: mansha
59
ms.service: cosmos-db
610
ms.subservice: apache-gremlin
711
ms.topic: faq
8-
ms.date: 04/28/2020
9-
author: manishmsfte
10-
ms.author: mansha
11-
title: Frequently asked questions about the API for Gremlin in Azure Cosmos DB
12+
ms.date: 02/23/2024
13+
title: Frequently asked questions about Azure Cosmos DB for Apache Gremlin
1214
summary: |
1315
[!INCLUDE[Gremlin](../includes/appliesto-gremlin.md)]
14-
15-
This article explains answers to some frequently asked questions about API for Gremlin in Azure Cosmos DB.
16-
1716
sections:
1817
- name: Gremlin queries
1918
questions:
2019
- question: |
2120
How to evaluate the efficiency of Gremlin queries
2221
answer: |
23-
The **executionProfile()** preview step can be used to provide an analysis of the query execution plan. This step needs to be added to the end of any Gremlin query as illustrated by the following example:
24-
25-
**Query example**
26-
27-
```
28-
g.V('mary').out('knows').executionProfile()
29-
```
30-
31-
**Example output**
32-
33-
```json
34-
[
35-
{
36-
"gremlin": "g.V('mary').out('knows').executionProfile()",
37-
"totalTime": 8,
38-
"metrics": [
39-
{
40-
"name": "GetVertices",
41-
"time": 3,
42-
"annotations": {
43-
"percentTime": 37.5
44-
},
45-
"counts": {
46-
"resultCount": 1
47-
}
48-
},
49-
{
50-
"name": "GetEdges",
51-
"time": 5,
52-
"annotations": {
53-
"percentTime": 62.5
54-
},
55-
"counts": {
56-
"resultCount": 0
57-
},
58-
"storeOps": [
59-
{
60-
"count": 0,
61-
"size": 0,
62-
"time": 0.6
63-
}
64-
]
65-
},
66-
{
67-
"name": "GetNeighborVertices",
68-
"time": 0,
69-
"annotations": {
70-
"percentTime": 0
71-
},
72-
"counts": {
73-
"resultCount": 0
74-
}
75-
},
76-
{
77-
"name": "ProjectOperator",
78-
"time": 0,
79-
"annotations": {
80-
"percentTime": 0
81-
},
82-
"counts": {
83-
"resultCount": 0
84-
}
85-
}
86-
]
87-
}
88-
]
89-
```
90-
22+
The **executionProfile()** preview step can be used to provide an analysis of the query execution plan. This step needs to be added to the end of any Gremlin query. For example, you can add the step to the end of a `g.V('example').out('relationship')` query resulting in `g.V('example').out('relationship').executionProfile()`.
23+
9124
The output of the above profile shows how much time is spent obtaining the vertex objects, the edge objects, and the size of the working data set. This is related to the standard cost measurements for Azure Cosmos DB queries.
92-
25+
9326
- name: Other frequently asked questions
9427
questions:
9528
- question: |
9629
How are RU/s charged when running queries on a graph database?
9730
answer: |
98-
All graph objects, vertices, and edges, are shown as JSON documents in the backend. Since one Gremlin query can modify one or many graph objects at a time, the cost associated with it is directly related to the objects, edges that are processed by the query. This is the same process that Azure Cosmos DB uses for all other APIs. For more information, see [Request Units in Azure Cosmos DB](../request-units.md).
99-
100-
The RU charge is based on the working data set of the traversal, and not the result set. For example, if a query aims to obtain a single vertex as a result but needs to traverse more than one other object on the way, then the cost will be based on all the graph objects that it will take to compute the one result vertex.
101-
31+
All graph objects, vertices, and edges, are shown as JSON documents in the backend. Since one Gremlin query can modify one or many graph objects at a time, the cost associated with it's directly related to the objects, edges that are processed by the query. This is the same process that Azure Cosmos DB uses for all other APIs. For more information, see [Request Units in Azure Cosmos DB](../request-units.md).
32+
33+
The RU charge is based on the working data set of the traversal, and not the result set. For example, if a query aims to obtain a single vertex as a result but needs to traverse more than one other object on the way, then the cost is based on all the graph objects that it takes to compute the one result vertex.
34+
10235
- question: |
10336
What's the maximum scale that a graph database can have in Azure Cosmos DB for Gremlin?
10437
answer: |
105-
Azure Cosmos DB makes use of [horizontal partitioning](../partitioning-overview.md) to automatically address increase in storage and throughput requirements. The maximum throughput and storage capacity of a workload is determined by the number of partitions that are associated with a given container. However, a API for Gremlin container has a specific set of guidelines to ensure a proper performance experience at scale. For more information about partitioning, and best practices, see [partitioning in Azure Cosmos DB](../partitioning-overview.md) article.
106-
38+
Azure Cosmos DB makes use of [horizontal partitioning](../partitioning-overview.md) to automatically address increase in storage and throughput requirements. The maximum throughput and storage capacity of a workload is determined by the number of partitions that are associated with a given container. However, an API for Gremlin container has a specific set of guidelines to ensure a proper performance experience at scale. For more information about partitioning, and best practices, see [partitioning in Azure Cosmos DB](../partitioning-overview.md) article.
39+
10740
- question: |
10841
For C#/.NET development, should I use the Microsoft.Azure.Graphs package or Gremlin.NET?
10942
answer: |
110-
Azure Cosmos DB for Gremlin leverages the open-source drivers as the main connectors for the service. So the recommended option is to use [drivers that are supported by Apache Tinkerpop](https://tinkerpop.apache.org/).
111-
43+
Azure Cosmos DB for Gremlin uses the open-source drivers as the main connectors for the service. So the recommended option is to use [drivers supported by Apache](https://tinkerpop.apache.org/).
44+
11245
- question: |
11346
How can I protect against injection attacks using Gremlin drivers?
11447
answer: |
11548
Most native Apache Tinkerpop Gremlin drivers allow the option to provide a dictionary of parameters for query execution. This is an example of how to do it in [Gremlin.Net](https://tinkerpop.apache.org/docs/3.2.7/reference/#gremlin-DotNet) and in [Gremlin-Javascript](https://github.com/Azure-Samples/azure-cosmos-db-graph-nodejs-getting-started/blob/main/app.js).
116-
49+
11750
- question: |
11851
Why am I getting the "Gremlin Query Compilation Error: Unable to find any method" error?
11952
answer: |
12053
Azure Cosmos DB for Gremlin implements a subset of the functionality defined in the Gremlin surface area. For supported steps and more information, see [Gremlin support](support.md) article.
121-
54+
12255
The best workaround is to rewrite the required Gremlin steps with the supported functionality, since all essential Gremlin steps are supported by Azure Cosmos DB.
123-
56+
12457
- question: |
12558
Why am I getting the "WebSocketException: The server returned status code '200' when status code '101' was expected" error?
12659
answer: |
127-
This error is likely thrown when the wrong endpoint is being used. The endpoint that generates this error has the following pattern:
128-
129-
`https:// YOUR_DATABASE_ACCOUNT.documents.azure.com:443/`
130-
60+
This error is likely thrown when the wrong endpoint is being used. The endpoint that generates this error has the following pattern: `https://<account-name>.documents.azure.com:443/`
61+
13162
This is the documents endpoint for your graph database. The correct endpoint to use is the Gremlin Endpoint, which has the following format:
132-
63+
13364
`https://YOUR_DATABASE_ACCOUNT.gremlin.cosmosdb.azure.com:443/`
134-
65+
13566
- question: |
13667
Why am I getting the "RequestRateIsTooLarge" error?
13768
answer: |
138-
This error means that the allocated Request Units per second aren't enough to serve the query. This error is usually seen when you run a query that obtains all vertices:
139-
69+
This error means that the allocated Request Units per second aren't enough to serve the query. This error is seen when you run a query that obtains all vertices:
70+
14071
```
14172
// Query example:
14273
g.V()
14374
```
144-
145-
This query will attempt to retrieve all vertices from the graph. So, the cost of this query will be equal to at least the number of vertices in terms of RUs. The RU/s setting should be adjusted to address this query.
146-
75+
76+
This query attempts to retrieve all vertices from the graph. So, the cost of this query will be equal to at least the number of vertices in terms of RUs. The RU/s setting should be adjusted to address this query.
77+
14778
- question: |
14879
Why do my Gremlin driver connections get dropped eventually?
14980
answer: |
@@ -155,8 +86,12 @@ sections:
15586
Fluent API calls aren't yet supported by the Azure Cosmos DB for Gremlin. Fluent API calls require an internal formatting feature known as bytecode support that currently isn't supported by Azure Cosmos DB for Gremlin. Due to the same reason, the latest Gremlin-JavaScript driver is also currently not supported.
15687
15788
additionalContent: |
89+
## Related content
90+
91+
- [Azure Cosmos DB for Gremlin wire protocol support](support.md)
92+
- Create, query, and traverse an Azure Cosmos DB graph database using the [Gremlin console](quickstart-console.md)
93+
94+
## Next step
15895
159-
## Next steps
160-
161-
* [Azure Cosmos DB for Gremlin wire protocol support](support.md)
162-
* Create, query, and traverse an Azure Cosmos DB graph database using the [Gremlin console](quickstart-console.md)
96+
> [!div class="nextstepaction"]
97+
> [Frequently asked questions about Azure Cosmos DB](../faq.yml)

articles/cosmos-db/gremlin/index.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ landingContent:
2323
- text: Wire protocol compatibility with TinkerPop
2424
url: support.md
2525
- text: FAQ
26-
url: gremlin-api-faq.yml
26+
url: faq.yml
2727
- linkListType: concept
2828
links:
2929
- text: Wire protocol compatibility

articles/cosmos-db/index.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ additionalContent:
8989
- text: Find request unit charge
9090
url: table/find-request-unit-charge.md
9191
- text: FAQ
92-
url: table/table-api-faq.yml
92+
url: table/faq.yml
9393
- text: See more >
9494
url: table/index.yml
9595
- title: PostgreSQL

articles/cosmos-db/mongodb/TOC.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
href: choose-model.md
55
- name: Comparing MongoDB Atlas
66
href: cosmos-db-vs-mongodb-atlas.md
7-
- name: FAQ
8-
href: faq.yml
97
- name: RU
108
items:
119
- name: MongoDB RU documentation
@@ -27,7 +25,7 @@
2725
- name: Upgrade API version
2826
href: upgrade-version.md
2927
- name: FAQ
30-
href: mongodb-faq.yml
28+
href: faq.yml
3129
- name: Change log
3230
href: change-log.md
3331
- name: Quickstarts

0 commit comments

Comments
 (0)