Skip to content

Commit 2df1266

Browse files
author
Rodrigo Souza
authored
Cosmos DB Python SDK updates (Azure#19031)
* Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md
1 parent c33c230 commit 2df1266

File tree

1 file changed

+48
-30
lines changed

1 file changed

+48
-30
lines changed

sdk/cosmos/azure-cosmos/README.md

Lines changed: 48 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -83,41 +83,55 @@ For more information about these resources, see [Working with Azure Cosmos datab
8383

8484
## Limitations
8585

86-
Currently the features below are **not supported**.
87-
88-
**Data Plane Limitations:**
89-
90-
* Group By queries (in roadmap for 2021)
91-
* Language Native async i/o (in roadmap for 2021)
92-
* Queries with COUNT from a DISTINCT subquery: SELECT COUNT (1) FROM (SELECT DISTINCT C.ID FROM C)
93-
* Bulk/Transactional batch processing
94-
* Direct TCP Mode access
95-
* Continuation token for cross partitions queries
96-
* Change Feed: Processor
97-
* Change Feed: Read multiple partitions key values
98-
* Change Feed: Read specific time
99-
* Change Feed: Read from the beggining
100-
* Change Feed: Pull model
101-
* Cross-partition ORDER BY for mixed types
102-
103-
**Control Plane Limitations:**
104-
105-
* Get CollectionSizeUsage, DatabaseUsage, and DocumentUsage metrics
106-
* Create Geospatial Index
107-
* Provision Autoscale DBs or containers
108-
* Update Autoscale throughput
109-
* Update analytical store ttl (time to live)
110-
* Get the connection string
111-
* Get the minimum RU/s of a container.
112-
113-
## Bulk processing Limitation Workaround
86+
Currently the features below are **not supported**. For alternatives options, check the **Workarounds** section below.
87+
88+
### Data Plane Limitations:
89+
90+
* Group By queries (in roadmap for 2021).
91+
* Language Native async i/o (in roadmap for 2021).
92+
* Queries with COUNT from a DISTINCT subquery: SELECT COUNT (1) FROM (SELECT DISTINCT C.ID FROM C).
93+
* Bulk/Transactional batch processing.
94+
* Direct TCP Mode access.
95+
* Continuation token for cross partitions queries.
96+
* Change Feed: Processor.
97+
* Change Feed: Read multiple partitions key values.
98+
* Change Feed: Read specific time.
99+
* Change Feed: Read from the beggining.
100+
* Change Feed: Pull model.
101+
* Cross-partition ORDER BY for mixed types.
102+
* Integrated Cache using the default consistency level, that is "Session". To take advantage of the new [Cosmos DB Integrated Cache](https://docs.microsoft.com/azure/cosmos-db/integrated-cache), it is required to explicitly set CosmosClient consistency level to "Eventual": `consistency_level= Eventual`.
103+
104+
### Control Plane Limitations:
105+
106+
* Get CollectionSizeUsage, DatabaseUsage, and DocumentUsage metrics.
107+
* Create Geospatial Index.
108+
* Provision Autoscale DBs or containers.
109+
* Update Autoscale throughput.
110+
* Update analytical store ttl (time to live).
111+
* Get the connection string.
112+
* Get the minimum RU/s of a container.
113+
114+
### Security Limitations:
115+
116+
* AAD support.
117+
118+
## Workarounds
119+
120+
### Bulk processing Limitation Workaround
114121

115122
If you want to use Python SDK to perform bulk inserts to Cosmos DB, the best alternative is to use [stored procedures](https://docs.microsoft.com/azure/cosmos-db/how-to-write-stored-procedures-triggers-udfs) to write multiple items with the same partition key.
116123

117-
## Control Plane Limitations Workaround
124+
### Control Plane Limitations Workaround
125+
126+
Typically you can use [Azure Portal](https://portal.azure.com/), [Azure Cosmos DB Resource Provider REST API](https://docs.microsoft.com/rest/api/cosmos-db-resource-provider), [Azure CLI](https://docs.microsoft.com/azure/cosmos-db/manage-with-cli) or [PowerShell](https://docs.microsoft.com/azure/cosmos-db/manage-with-powershell) for the control plane unsupported limitations.
127+
128+
### AAD Support Workaround
118129

119-
Typically you can use [Azure Portal](https://portal.azure.com/), [Azure CLI](https://docs.microsoft.com/azure/cosmos-db/manage-with-cli) or [PowerShell](https://docs.microsoft.com/azure/cosmos-db/manage-with-powershell) for the control plane unsupported limitations.
130+
A possible workaround is to use managed identities to [programmatically](https://docs.microsoft.com/azure/cosmos-db/managed-identity-based-authentication) get the keys.
120131

132+
## Consistency Level
133+
134+
Please be aware that this SDK has "Session" as the default consistency level, and it **overrides** your Cosmos DB database account default option. Click [here](https://docs.microsoft.com/azure/cosmos-db/consistency-levels#eventual-consistency) to learn more about Cosmos DB consistency levels.
121135

122136
## Boolean Data Type
123137

@@ -136,6 +150,10 @@ Cosmos DB SQL language allows you to [get subitems by using the FROM clause](htt
136150
* For SQL queries using the `query_items` method, this SDK demands that you specify the `partition_key` or use the `enable_cross_partition_query` flag.
137151
* If you are getting subitems and specifying the `partition_key`, please make sure that your partition key is included in the subitems, which is not true for most of the cases.
138152

153+
## Max Item Count
154+
155+
This is a parameter of the query_items method, an integer indicating the maximum number of items to be returned per page. The `None` value can be specified to let the service determine the optimal item count. This is the recommended configuration value, and the default behavior of this SDK when it is not set.
156+
139157
## Examples
140158

141159
The following sections provide several code snippets covering some of the most common Cosmos DB tasks, including:

0 commit comments

Comments
 (0)