You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/stream-analytics/stream-analytics-documentdb-output.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ The Azure Cosmos DB output in Stream Analytics enables writing your stream proce
28
28
Some of the Cosmos DB container options are detailed below.
29
29
30
30
## Tune consistency, availability, and latency
31
-
To match your application requirements, Azure Cosmos DB allows you to fine-tune the database and containers and make trade-offs between consistency, availability, latency and throughput. Depending on what levels of read consistency your scenario needs against read and write latency, you can choose a consistency level on your database account. Throughput can be improved by scaling up Request Units(RUs) on the container. Also by default, Azure Cosmos DB enables synchronous indexing on each CRUD operation to your container. This is another useful option to control the write/read performance in Azure Cosmos DB. For more information, review the [change your database and query consistency levels](../cosmos-db/consistency-levels.md) article.
31
+
To match your application requirements, Azure Cosmos DB allows you to fine-tune the database and containers and make trade-offs between consistency, availability, latency, and throughput. Depending on what levels of read consistency your scenario needs against read and write latency, you can choose a consistency level on your database account. Throughput can be improved by scaling up Request Units(RUs) on the container. Also by default, Azure Cosmos DB enables synchronous indexing on each CRUD operation to your container. This is another useful option to control the write/read performance in Azure Cosmos DB. For more information, review the [change your database and query consistency levels](../cosmos-db/consistency-levels.md) article.
32
32
33
33
## Upserts from Stream Analytics
34
34
Stream Analytics integration with Azure Cosmos DB allows you to insert or update records in your container based on a given Document ID column. This is also referred to as an *Upsert*.
@@ -47,11 +47,11 @@ Azure Cosmos DB [unlimited](../cosmos-db/partition-data.md) containers are the r
47
47
> [!NOTE]
48
48
> At this time, Azure Stream Analytics only supports unlimited containers with partition keys at the top level. For example, `/region` is supported. Nested partition keys (e.g. `/region/name`) are not supported.
49
49
50
-
Depending on your choice of partition key you might receive this _warning_:
50
+
Depending on your choice of partition key, you might receive this _warning_:
51
51
52
52
`CosmosDB Output contains multiple rows and just one row per partition key. If the output latency is higher than expected, consider choosing a partition key that contains at least several hundred records per partition key.`
53
53
54
-
It is important to choose a partition key property that has a number of distinct values, and lets you distribute your workload evenly across these values. As a natural artifact of partitioning, requests involving the same partition key are limited by the maximum throughput of a single partition. Additionally, the storage size for documents belonging to the same partition key is limited to 10GB. An ideal partition key is one that appears frequently as a filter in your queries and has sufficient cardinality to ensure your solution is scalable.
54
+
It is important to choose a partition key property that has a number of distinct values, and lets you distribute your workload evenly across these values. As a natural artifact of partitioning, requests involving the same partition key are limited by the maximum throughput of a single partition. Additionally, the storage size for documents belonging to the same partition key is limited to 10 GB. An ideal partition key is one that appears frequently as a filter in your queries and has sufficient cardinality to ensure your solution is scalable.
55
55
56
56
A partition key is also the boundary for transactions in DocumentDB's stored procedures and triggers. You should choose the partition key so that documents that occur together in transactions share the same partition key value. The article [Partitioning in Cosmos DB](../cosmos-db/partitioning-overview.md) gives more details on choosing a partition key.
57
57
@@ -60,7 +60,7 @@ For fixed Azure Cosmos DB containers, Stream Analytics allows no way to scale up
60
60
The ability to write to multiple fixed containers is being deprecated and is not recommended for scaling out your Stream Analytics job.
61
61
62
62
## Improved throughput with Compatibility Level 1.2
63
-
With Compatibility level 1.2, Stream Analytics supports native integration to bulk write into Cosmos DB. This enables writing effectively to Cosmos DB with maximizing throughput and efficiently handle throttling requests. The improved writing mechanism is available under a new compatibility level due to an upsert behavior difference. Prior to 1.2, the upsert behavior is to insert or merge the document. With 1.2, upserts behavior is modified to insert or replace the document.
63
+
With Compatibility level 1.2, Stream Analytics supports native integration to bulk write into Cosmos DB. This enables writing effectively to Cosmos DB with maximizing throughput and efficiently handle throttling requests. The improved writing mechanism is available under a new compatibility level due to an upsert behavior difference. Prior to 1.2, the upsert behavior is to insert or merge the document. With 1.2, upserts behavior is modified to insert or replace the document.
64
64
65
65
Before 1.2, uses a custom stored procedure to bulk upsert documents per partition key into Cosmos DB, where a batch is written as a transaction. Even when a single record hits a transient error (throttling), the whole batch must be retried. This made scenarios with even reasonable throttling relatively slower. Following comparison shows how such jobs would behave with 1.2.
66
66
@@ -73,7 +73,7 @@ Incoming event rate in Event Hub is 2x higher than Cosmos DB containers (20K RUs
73
73

74
74
75
75
With 1.2, Stream Analytics is more intelligent in utilizing 100% of the available throughput in Cosmos DB with very few resubmissions from throttling/rate limiting. This provides a better experience for other workloads like queries running on the container at the same time. In case you need to try out how ASA scales out with Cosmos DB as a sink for 1k to 10k messages/second, here is an [azure samples project](https://github.com/Azure-Samples/streaming-at-scale/tree/master/eventhubs-streamanalytics-cosmosdb) that lets you do that.
76
-
Please note that Cosmos DB output throughput is identical with 1.0 and 1.1. Since 1.2 is currently not the default, you can [set compatibility level](https://docs.microsoft.com/azure/stream-analytics/stream-analytics-compatibility-level) for a Stream Analytics job by using portal or by using the [create job REST API call](https://docs.microsoft.com/rest/api/streamanalytics/stream-analytics-job). It’s *strongly recommended* to use Compatibility Level 1.2 in ASA with Cosmos DB.
76
+
Please note that Cosmos DB output throughput is identical with 1.0 and 1.1. Since 1.2 is currently not the default, you can [set compatibility level](https://docs.microsoft.com/azure/stream-analytics/stream-analytics-compatibility-level) for a Stream Analytics job by using portal or by using the [create job REST API call](https://docs.microsoft.com/rest/api/streamanalytics/stream-analytics-job). It’s *strongly recommended* to use Compatibility Level 1.2 in ASA with Cosmos DB.
77
77
78
78
79
79
@@ -95,7 +95,7 @@ Creating Cosmos DB as an output in Stream Analytics generates a prompt for infor
95
95
96
96
## Error Handling and retries
97
97
98
-
In the event of a transient failures, service unavailability or throttling while sending events to Cosmos DB, Stream Analytics retries indefinitely to successfully complete the operation. However, there are some failures for which retries are not attempted and they are as follows:
98
+
In the event of a transient failure, service unavailability or throttling while sending events to Cosmos DB, Stream Analytics retries indefinitely to successfully complete the operation. However, there are some failures for which retries are not attempted and they are as follows:
0 commit comments