Skip to content

Commit 03f19f8

Browse files
authored
Merge pull request #43636 from Fleid/patch-1
Update stream-analytics-documentdb-output.md
2 parents 5ba8392 + 6d93260 commit 03f19f8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

articles/stream-analytics/stream-analytics-documentdb-output.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,16 @@ Creating Cosmos DB as an output in Stream Analytics generates a prompt for infor
9393
|Container name | The container name to be used. `MyContainer` is a sample valid input - one container named `MyContainer` must exist. |
9494
|Document ID | Optional. The column name in output events used as the unique key on which insert or update operations must be based. If left empty, all events will be inserted, with no update option.|
9595

96+
Once the Cosmos DB output is configured, it can be used in the query as the target of an [INTO statement](https://docs.microsoft.com/stream-analytics-query/into-azure-stream-analytics). When using a Cosmos DB output as such, [a partition key needs to be set explicitly](https://docs.microsoft.com/azure/stream-analytics/stream-analytics-parallelization#partitions-in-sources-and-sinks). The output record must contain a case-sensitive column named after the partition key in Cosmos DB. To achieve greater parallelization, the statement may require a [PARTITION BY clause](https://docs.microsoft.com/azure/stream-analytics/stream-analytics-parallelization#embarrassingly-parallel-jobs) using the same column.
97+
98+
**Sample query**:
99+
100+
```SQL
101+
SELECT TollBoothId, PartitionId
102+
INTO CosmosDBOutput
103+
FROM Input1 PARTITION BY PartitionId
104+
```
105+
96106
## Error Handling and retries
97107

98108
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

Comments
 (0)