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/synapse-analytics/sql/query-cosmos-db-analytical-store.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,9 +19,6 @@ For querying Azure Cosmos DB, the full [SELECT](/sql/t-sql/queries/select-transa
19
19
20
20
This article explains how to write a query with a serverless SQL pool that queries data from Azure Cosmos DB containers that are enabled with Azure Synapse Link. You can then learn more about building serverless SQL pool views over Azure Cosmos DB containers and connecting them to Power BI models in [this tutorial](./tutorial-data-analyst.md). This tutorial uses a container with an [Azure Cosmos DB well-defined schema](/azure/cosmos-db/analytical-store-introduction#schema-representation). You can also check out the Learn module on how to [Query Azure Cosmos DB with SQL Serverless for Azure Synapse Analytics](/training/modules/query-azure-cosmos-db-with-sql-serverless-for-azure-synapse-analytics/).
21
21
22
-
>[!NOTE]
23
-
> You can't use managed identity to access an Azure Cosmos DB container from serverless SQL pool.
24
-
25
22
## Prerequisites
26
23
27
24
- Make sure that you prepare the analytical store:
@@ -37,10 +34,11 @@ This article explains how to write a query with a serverless SQL pool that queri
37
34
## Overview
38
35
39
36
Serverless SQL pool enables you to query Azure Cosmos DB analytical storage using `OPENROWSET` function.
37
+
-`OPENROWSET` that uses workspace managed identity to access the analytical store.
40
38
-`OPENROWSET` with inline key. This syntax can be used to query Azure Cosmos DB collections without the need to prepare credentials.
41
39
-`OPENROWSET` that references a credential that contains the Azure Cosmos DB account key. This syntax can be used to create views on Azure Cosmos DB collections.
42
40
43
-
### [OPENROWSET with key](#tab/openrowset-key)
41
+
### [OPENROWSET with key or managed identity](#tab/openrowset-key)
44
42
45
43
To support querying and analyzing data in an Azure Cosmos DB analytical store, a serverless SQL pool is used. The serverless SQL pool uses the `OPENROWSET` SQL syntax, so you must first convert your Azure Cosmos DB connection string to this format:
46
44
@@ -67,6 +65,11 @@ The SQL connection string has the following format:
67
65
```
68
66
69
67
The region is optional. If omitted, the container's primary region is used.
68
+
You can use workspace managed identity instead fo the CosmosDB account key:
> There's another optional parameter in connection string called `endpoint`. The `endpoint` param is needed for accounts that don't match the standard `*.documents.azure.com` format. For example, if your Azure Cosmos DB account ends with `.documents.azure.us`, make sure that you add `endpoint=<account name>.documents.azure.us` in the connection string.
0 commit comments