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
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,13 +46,13 @@ OPENROWSET(
46
46
The SQL connection string for Azure Cosmos DB includes the following components:
47
47
-**account** - The name of the Azure Cosmos DB account you are targeting.
48
48
-**database** - The container name, specified without quotation marks in the OPENROWSET syntax. If the container name contains special characters (for example, a dash -), it should be enclosed in square brackets ([]).
49
-
-**region** (optional) - The region of your CosmosDB analytical storage. If omitted, the container's primary region is used.
50
-
-**endpoint** (optional) - required if your CosmosDB account does not follow the standard `*.documents.azure.com` format.
49
+
-**region** (optional) - The region of your Cosmos DB analytical storage. If omitted, the container's primary region is used.
50
+
-**endpoint** (optional) - required if your Cosmos DB account does not follow the standard `*.documents.azure.com` format.
51
51
52
52
> [!IMPORTANT]
53
53
> The `endpoint` parameter 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.
54
54
55
-
These properties can be identified from the standard CosmosDb connection string, for example:
55
+
These properties can be identified from the standard Cosmos DB connection string, for example:
This connection string does not include the authentication information required to connect to CosmosDB analytical storage. Additional information is needed depending on the type of authentication used:
65
+
This connection string does not include the authentication information required to connect to Cosmos DB analytical storage. Additional information is needed depending on the type of authentication used:
66
66
- If `OPENROWSET` uses workspace managed identity to access the analytical store, you should add the `AuthType` property.
67
67
- If `OPENROWSET` uses an inline account key, you should add the `key` property. This allows you to query Azure Cosmos DB collections without needing to prepare credentials.
68
68
- Instead of including authentication information in the connection string, `OPENROWSET` can reference a credential that contains the Azure Cosmos DB account key. This approach can be used to create views on Azure Cosmos DB collections.
@@ -71,7 +71,7 @@ These options are described below.
71
71
72
72
### [OPENROWSET with key or managed identity](#tab/openrowset-key)
73
73
74
-
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:
74
+
The serverless SQL pool enables you to query Cosmos DB Analytical storage and authenticate with the original Cosmos DB account key or to allow Synapse managed identity to access the Cosmos DB Analytical storage. You can use the following syntax in this scenario:
75
75
76
76
```sql
77
77
OPENROWSET(
@@ -80,20 +80,20 @@ OPENROWSET(
80
80
<Container name>
81
81
) [ < with clause > ] AS alias
82
82
```
83
-
In addition to the common properties in the SQL connection string that are described above (**account**, **database**, **region**, and **endpoint**), in this case, you need to add **one** of the following options:
84
-
-**AuthType** - set this option to `ManagedIdentity` if accessing CosmosDB using the Synapse workspace Managed Identity.
85
-
-**key** - The master key for accessing CosmosDB data, used if not utilizing the Synapse workspace managed identity.
83
+
In addition to the common properties in the SQL connection string that are described above (**account**, **database**, **region**, and **endpoint**), you need to add **one** of the following options:
84
+
-**AuthType** - set this option to `ManagedIdentity` if accessing Cosmos DB using the Synapse workspace Managed Identity.
85
+
-**key** - The master key for accessing Cosmos DB data, used if not utilizing the Synapse workspace managed identity.
86
86
87
87
The examples of connection strings are shown in the following table:
### [OPENROWSET with credential](#tab/openrowset-credential)
95
95
96
-
You can use `OPENROWSET` syntax that references a credential:
96
+
Instead of defining the access key in OPENROWSET, you can place it in the separate credential and use `OPENROWSET` syntax that references a credential:
0 commit comments