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
+13-10Lines changed: 13 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,31 +50,34 @@ OPENROWSET(
50
50
) [ < with clause > ] AS alias
51
51
```
52
52
53
-
The SQL connection string for Azure Cosmos DB specifies the Azure Cosmos DB account name, database name, database account master key, and an optional region name to the `OPENROWSET` function. Some of this information can be taken from the standard Azure Cosmos DB connection string.
53
+
The SQL connection string for Azure Cosmos DB includes the following components:
54
+
-**Account Name** - The name of the Azure Cosmos DB account you are targeting.
55
+
-**Database Name** - 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 ([]).
56
+
-**Region Name** (optional) - The region of your CosmosDB analytical storage. If omitted, the container's primary region is used.
57
+
-**AuthType** - set this option to `ManagedIdentity` if accessing CosmosDB using the Synapse workspace Managed Identity instead of the account key.
58
+
-**Key** - The master key for accessing CosmosDB data, used if not utilizing the Synapse workspace managed identity.
59
+
-**Endpoint** (optional) - required if your CosmosDB account does not follow the standard `*.documents.azure.com` format.
54
60
55
-
Convert from the standard Azure Cosmos DB connection string format:
61
+
Some of this information can be derived from the standard Azure Cosmos DB connection string:
> 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.
76
80
77
-
The Azure Cosmos DB container name is specified without quotation marks in the `OPENROWSET` syntax. If the container name has any special characters, for example, a dash (-), the name should be wrapped within square brackets (`[]`) in the `OPENROWSET` syntax.
78
81
79
82
### [OPENROWSET with credential](#tab/openrowset-credential)
80
83
@@ -110,7 +113,7 @@ Database account master key is placed in server-level credential or database sco
110
113
111
114
## Sample dataset
112
115
113
-
The examples in this article are based on data from the [European Centre for Disease Prevention and Control (ECDC) COVID-19 Cases](/azure/open-datasets/dataset-ecdc-covid-cases) and [COVID-19 Open Research Dataset (CORD-19)](/azure/open-datasets/dataset-covid-19-open-research).
116
+
The examples in this article are based on data from the [European Center for Disease Prevention and Control (ECDC) COVID-19 Cases](/azure/open-datasets/dataset-ecdc-covid-cases) and [COVID-19 Open Research Dataset (CORD-19)](/azure/open-datasets/dataset-covid-19-open-research).
114
117
115
118
You can see the license and the structure of data on these pages. You can also [download sample data for the ECDC](https://pandemicdatalake.blob.core.windows.net/public/curated/covid-19/ecdc_cases/latest/ecdc_cases.json) and CORD-19 datasets.
116
119
@@ -256,7 +259,7 @@ FROM OPENROWSET(
256
259
257
260
Don't use `OPENROWSET` without explicitly defined schema because it might affect your performance. Make sure that you use the smallest possible sizes for your columns (for example `VARCHAR(100)` instead of default `VARCHAR(8000)`). You should use some UTF-8 collation as default database collation or set it as explicit column collation to avoid a [UTF-8 conversion issue](../troubleshoot/reading-utf8-text.md). Collation `Latin1_General_100_BIN2_UTF8` provides best performance when you filter data using some string columns.
258
261
259
-
When you query the view, you might encounter errors or unexpected results. The view references columns or objects were probably modified or no longer exist. You need to manually adjust the view definition to align with the underlying schema changes. Keep in mind that this can happen both when using automatic schema inference in the view and when explicitly specifying the schema.
262
+
When you query the view, you might encounter errors or unexpected results. The view references columns or objects were probably modified or no longer exists. You need to manually adjust the view definition to align with the underlying schema changes. Keep in mind that this can happen both when using automatic schema inference in the view and when explicitly specifying the schema.
0 commit comments