Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 48 additions & 30 deletions sdk/cosmos/azure-cosmos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,41 +83,55 @@ For more information about these resources, see [Working with Azure Cosmos datab

## Limitations

Currently the features below are **not supported**.

**Data Plane Limitations:**

* Group By queries (in roadmap for 2021)
* Language Native async i/o (in roadmap for 2021)
* Queries with COUNT from a DISTINCT subquery: SELECT COUNT (1) FROM (SELECT DISTINCT C.ID FROM C)
* Bulk/Transactional batch processing
* Direct TCP Mode access
* Continuation token for cross partitions queries
* Change Feed: Processor
* Change Feed: Read multiple partitions key values
* Change Feed: Read specific time
* Change Feed: Read from the beggining
* Change Feed: Pull model
* Cross-partition ORDER BY for mixed types

**Control Plane Limitations:**

* Get CollectionSizeUsage, DatabaseUsage, and DocumentUsage metrics
* Create Geospatial Index
* Provision Autoscale DBs or containers
* Update Autoscale throughput
* Update analytical store ttl (time to live)
* Get the connection string
* Get the minimum RU/s of a container.

## Bulk processing Limitation Workaround
Currently the features below are **not supported**. For alternatives options, check the **Workarounds** section below.

### Data Plane Limitations:

* Group By queries (in roadmap for 2021).
* Language Native async i/o (in roadmap for 2021).
* Queries with COUNT from a DISTINCT subquery: SELECT COUNT (1) FROM (SELECT DISTINCT C.ID FROM C).
* Bulk/Transactional batch processing.
* Direct TCP Mode access.
* Continuation token for cross partitions queries.
* Change Feed: Processor.
* Change Feed: Read multiple partitions key values.
* Change Feed: Read specific time.
* Change Feed: Read from the beggining.
* Change Feed: Pull model.
* Cross-partition ORDER BY for mixed types.
* 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`.

### Control Plane Limitations:

* Get CollectionSizeUsage, DatabaseUsage, and DocumentUsage metrics.
* Create Geospatial Index.
* Provision Autoscale DBs or containers.
* Update Autoscale throughput.
* Update analytical store ttl (time to live).
* Get the connection string.
* Get the minimum RU/s of a container.

### Security Limitations:

* AAD support.

## Workarounds

### Bulk processing Limitation Workaround

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.

## Control Plane Limitations Workaround
### Control Plane Limitations Workaround

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.

### AAD Support Workaround

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.
A possible workaround is to use managed identities to [programmatically](https://docs.microsoft.com/azure/cosmos-db/managed-identity-based-authentication) get the keys.

## Consistency Level

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.

## Boolean Data Type

Expand All @@ -136,6 +150,10 @@ Cosmos DB SQL language allows you to [get subitems by using the FROM clause](htt
* 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.
* 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.

## Max Item Count

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.

## Examples

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