Skip to content

Commit f8482e4

Browse files
authored
Merge pull request #114585 from Kat-Campise/arnaud_articles
arnaud articles
2 parents a72a67c + 3d0e4a1 commit f8482e4

File tree

4 files changed

+41
-30
lines changed

4 files changed

+41
-30
lines changed

articles/synapse-analytics/quickstart-connect-synapse-link-cosmos-db.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Connect to Synapse Link for Cosmos DB
3-
description: How to connect a Cosmos DB to a Synapse workspace with Synapse Link
2+
title: Connect to Synapse Link for Azure Cosmos DB
3+
description: How to connect an Azure Cosmos DB to a Synapse workspace with Synapse Link
44
services: synapse-analytics
55
author: ArnoMicrosoft
66
ms.service: synapse-analytics
@@ -24,7 +24,11 @@ Before you connect an Azure Cosmos DB account to your workspace, there are a few
2424

2525
## Enable Azure Cosmos DB analytical store
2626

27-
To run large-scale analytics into Azure Cosmos DB without impacting your operational performance, we recommend enabling Synapse Link for Azure Cosmos DB which bring HTAP capability to a container and built-in support in Azure Synapse. Follow this quickstart to enable Synapse Link for Cosmos DB containers.
27+
To run large-scale analytics into Azure Cosmos DB without impacting your operational performance, we recommend enabling Synapse Link for Azure Cosmos DB. This function brings HTAP capability to a container and built-in support in Azure Synapse. Follow this quickstart to enable Synapse Link for Cosmos DB containers.
28+
29+
## Navigate to Synapse Studio
30+
31+
From your Synapse workspace, select **Launch Synapse Studio**. On the Synapse Studio home page, select **Data, which will take you to the **Data Object Explorer**.
2832

2933
## Connect an Azure Cosmos DB database to a Synapse workspace
3034

@@ -37,10 +41,10 @@ From the Data Object Explorer, you can directly connect an Azure Cosmos DB datab
3741
4. Select ***Continue***
3842
5. Name the linked service. The name will be displayed in the Object Explorer and used by Synapse run-times to connect to the database and containers. We recommend using a friendly name.
3943
6. Select the **Cosmos DB account name** and **database name**
40-
7. (Optional) If no region is specified, Synapse run-time operations will be routed toward the nearest region where the analytical store is enabled. However you can set manually which region you want your users to access Cosmos DB analytical store. Select **Additional connection properties** and then **New**. Under **Property Name**, write ***PreferredRegions*** and set the **Value** to the region you want (example: WestUS2, there is no space between words and number)
44+
7. (Optional) If no region is specified, Synapse run-time operations will be routed toward the nearest region where the analytical store is enabled. However, you can set manually which region you want your users to access Cosmos DB analytical store. Select **Additional connection properties** and then **New**. Under **Property Name**, write ***PreferredRegions*** and set the **Value** to the region you want (example: WestUS2, there is no space between words and numbers)
4145
8. Select ***Create***
4246

43-
Azure Cosmos DB database are visible under the tab **Linked** in the Azure Cosmos DB section. You can differentiate an HTAP enabled Azure Cosmos DB container from an OLTP only container with the following icons:
47+
Azure Cosmos DB databases are visible under the tab **Linked** in the Azure Cosmos DB section. You can differentiate an HTAP enabled Azure Cosmos DB container from an OLTP only container with the following icons:
4448

4549
**Synapse container**:
4650

@@ -52,8 +56,9 @@ Azure Cosmos DB database are visible under the tab **Linked** in the Azure Cosmo
5256

5357
## Quickly interact with code-generated actions
5458

55-
By right-clicking into a container, you have list of gestures that will trigger a Spark or SQL run-time. Writing into a container will happen through the Transactional Store of Azure Cosmos DB and will consume Request Units.
59+
When you right-click into a container, you'll have a list of gestures that will trigger a Spark or SQL run-time. Writing into a container will happen through the Transactional Store of Azure Cosmos DB and will consume Request Units.
5660

5761
## Next steps
5862

59-
* [Learn what is supported between Synapse and Azure Cosmos DB](./synapse-link/concept-synapse-link-cosmos-db-support.md)
63+
* [Learn what is supported between Synapse and Azure Cosmos DB](./synapse-link/concept-synapse-link-cosmos-db-support.md)
64+
* [Learn how to query an analytical store with Synapse Spark](synapse-link/how-to-query-analytical-store-spark.md)

articles/synapse-analytics/synapse-link/concept-synapse-link-cosmos-db-support.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,25 @@ ms.reviewer: jrasnick
1313

1414
# Azure Synapse Link for Azure Cosmos DB supported features
1515

16-
This article describes what functionalities are currently supported in Azure Synapse Link for Azure Cosmos DB.
16+
This article describes the functionalities that are currently supported in Azure Synapse Link for Azure Cosmos DB.
1717

1818
## Azure Synapse support
1919

2020
There are two types of containers in Azure Cosmos DB:
2121
* HTAP container - A container with Synapse Link enabled. This container has both transactional store and analytical store.
2222
* OLTP container - A container with only transaction store; Synapse Link is not enabled.
2323

24-
You can connect to Cosmos DB container without enabling Synapse Link, in which case you can only read/write to the transactional store.
25-
26-
Here is list of the currently supported features within Synapse Link for Cosmos DB.
24+
You can connect to an Azure Cosmos DB container without enabling Synapse Link, in which case you can only read/write to the transactional store. What follows a is list of the currently supported features within Synapse Link for Azure Cosmos DB.
2725

2826
| Category | Description |[Spark](https://docs.microsoft.com/azure/synapse-analytics/sql/on-demand-workspace-overview) | [SQL serverless](https://docs.microsoft.com/azure/synapse-analytics/sql/on-demand-workspace-overview) |
2927
| -------------------- | ----------------------------------------------------------- |----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
3028
| **Run-time Support** |Support for read or write by Azure Synapse run-time|| [Contact Us](mailto:[email protected]?subject=[Enable%20Preview%20Feature]%20SQL%20serverless%20for%20Cosmos%20DB)|
3129
| **Cosmos DB API support** |API support as a Synapse Link| SQL / Mongo DB | SQL / Mongo DB |
32-
| **Object** |Objects such as table that can be created, pointing directly to Azure Cosmos DB container| View, Table | View |
30+
| **Object** |Objects such as a table that can be created, pointing directly to Azure Cosmos DB container| View, Table | View |
3331
| **Read** |Read data from an Azure Cosmos DB container| OLTP / HTAP | HTAP |
3432
| **Write** |Write data from run-time into an Azure Cosmos DB container| OLTP | n/a |
3533

36-
* If you write data into an Azure Cosmos DB container from Spark happens through the transactional store of Azure Cosmos DB and will impact the transactional performance of Azure Cosmos DB by consuming Request Units.
34+
* If you write data into an Azure Cosmos DB container from Spark, this process happens through the transactional store of Azure Cosmos DB and will impact the transactional performance of Azure Cosmos DB by consuming Request Units.
3735
* SQL pool integration through external tables is currently not supported.
3836

3937
## Supported code-generated actions for Spark
@@ -57,4 +55,5 @@ Here is list of the currently supported features within Synapse Link for Cosmos
5755

5856
## Next steps
5957

60-
See how to [connect to Synapse Link for Azure Cosmos DB](./how-to-connect-synapse-link-cosmos-db.md)
58+
* See how to [connect to Synapse Link for Azure Cosmos DB](../quickstart-connect-synapse-link-cosmos-db.md)
59+
* [Learn how to query the analytical store with Spark](how-to-query-analytical-store-spark.md)

articles/synapse-analytics/synapse-link/how-to-connect-synapse-link-cosmos-db.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This article describes how to access an Azure Cosmos DB database from Azure Syna
1717

1818
## Prerequisites
1919

20-
Before you connect an Azure Cosmos DB account to your workspace, there are a few things that you need.
20+
Before you connect an Azure Cosmos DB account to your workspace, you'll need the following:
2121

2222
* Existing Azure Cosmos DB account or create a new account following this [quickstart](https://docs.microsoft.com/azure/cosmos-db/how-to-manage-database-account)
2323
* Existing Synapse workspace or create a new workspace following this [quickstart](https://docs.microsoft.com/azure/synapse-analytics/quickstart-create-workspace)
@@ -26,21 +26,25 @@ Before you connect an Azure Cosmos DB account to your workspace, there are a few
2626

2727
To run large-scale analytics into Azure Cosmos DB without impacting your operational performance, we recommend enabling Synapse Link for Azure Cosmos DB. Synapse Link brings HTAP capability to a container and built-in support in Azure Synapse.
2828

29+
## Navigate to Synapse Studio
30+
31+
From your Synapse workspace, select **Launch Synapse Studio**. On the Synapse Studio home page, select **Data, which will take you to the **Data Object Explorer**.
32+
2933
## Connect an Azure Cosmos DB database to a Synapse workspace
3034

31-
Connecting an Azure Cosmos DB database is done as linked service. A Cosmos DB linked service enables users to browse and explore data, read, and write from Synapse Spark or SQL into Azure Cosmos DB.
35+
Connecting an Azure Cosmos DB database is done as a linked service. A Cosmos DB linked service enables users to browse and explore data, read, and write from Synapse Spark or SQL into Azure Cosmos DB.
3236

33-
From the Data Object Explorer, you can directly connect an Azure Cosmos DB database by doing the following steps:
37+
From the Data Object Explorer, you can directly connect to an Azure Cosmos DB database by doing the following steps:
3438
1. Select ***+*** icon near Data
3539
2. Select **Connect to external data**
36-
3. Select the API that you want to connect to: SQL or MongoDB
40+
3. Select the API that you want to connect to: SQL API or MongoDB API
3741
4. Select ***Continue***
3842
5. Name the linked service. The name will be displayed in the Object Explorer and used by Synapse run-times to connect to the database and containers. We recommend using a friendly name.
3943
6. Select the **Cosmos DB account name** and **database name**
40-
7. (Optional) If no region is specified, Synapse run-time operations will be routed toward the nearest region where the analytical store is enabled. However you can set manually which region you want your users to access Cosmos DB analytical store. Select **Additional connection properties** and then **New**. Under **Property Name**, write ***PreferredRegions*** and set the **Value** to the region you want (example: WestUS2, there is no space between words and number)
44+
7. (Optional) If no region is specified, Synapse run-time operations will be routed toward the nearest region where the analytical store is enabled. However, you can set manually which region you want your users to access Cosmos DB analytical store. Select **Additional connection properties** and then **New**. Under **Property Name**, write ***PreferredRegions*** and set the **Value** to the region you want (example: WestUS2, there is no space between words and number)
4145
8. Select ***Create***
4246

43-
Azure Cosmos DB database are visible under the tab **Linked** in the Azure Cosmos DB section. With Azure Cosmos DB, you can differentiate an HTAP enabled container from an OLTP only container through the following icons:
47+
Azure Cosmos DB databases are visible under the tab **Linked** in the Azure Cosmos DB section. With Azure Cosmos DB, you can differentiate an HTAP enabled container from an OLTP only container through the following icons:
4448

4549
**OLTP only container**:
4650

articles/synapse-analytics/synapse-link/how-to-query-analytical-store-spark.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ ms.reviewer: jrasnick
1313

1414
# Query Azure Cosmos DB Analytical Store with Synapse Spark
1515

16-
This article gives some examples on how you can interact with the Analytical Store from Synapse gestures. Those gestures are visible when you right-click on a container. With gestures, you can quickly generate code and tweak it to your needs. They are also perfect for discovering data with a single click.
16+
This article gives some examples on how you can interact with the analytical store from Synapse gestures. Gestures are visible when you right-click on a container. With gestures, you can quickly generate code and tailor it to your needs. Gestures are also perfect for discovering data with a single click.
1717

1818
## Load to DataFrame
1919

20-
In this step, you will read data from Azure Cosmos DB Analytical Store in a Spark DataFrame. It will display 10 rows from the DataFrame called ***df***. Once your data is in a dataframe, you can perform additional analysis. This operation does not impact the transactional store.
20+
In this step, you'll read data from Azure Cosmos DB analytical store in a Spark DataFrame. It will display 10 rows from the DataFrame called ***df***. Once your data is into dataframe, you can perform additional analysis.
21+
22+
This operation doesn't impact the transactional store.
2123

2224
```python
2325
# To select a preferred list of regions in a multi-region Cosmos DB account, add .option("spark.cosmos.preferredRegions", "<Region1>,<Region2>")
@@ -42,7 +44,9 @@ val df_olap = spark.read.format("cosmos.olap").
4244

4345
## Create Spark table
4446

45-
In this gesture, you will create a Spark table pointing to the container you selected. This operation does not incur any data movement. If you decide to delete the table, the underlying container (and corresponding Analytical Store) won't be impacted. This scenario is convenient to reuse tables through third-party tools and provide accessibility to the data at run-time.
47+
In this gesture, you'll create a Spark table pointing to the container you selected. That operation doesn't incur any data movement. If you decide to delete that table, the underlying container (and corresponding analytical store) won't be affected.
48+
49+
This scenario is convenient to reuse tables through third-party tools and provide accessibility to the data for the run-time.
4650

4751
```sql
4852
%%sql
@@ -56,7 +60,7 @@ create table call_center using cosmos.olap options (
5660

5761
## Write DataFrame to container
5862

59-
In this gesture, you will write a dataframe into a container. This operation will impact the transactional performance and consume Request Units. Using Azure Cosmos DB transactional performance is ideal for write transactions. Make sure that you replace **YOURDATAFRAME** by the dataframe that you want to write back to.
63+
In this gesture, you'll write a dataframe into a container. This operation will impact the transactional performance and consume Request Units. Using Azure Cosmos DB transactional performance is ideal for write transactions. Make sure that you replace **YOURDATAFRAME** by the dataframe that you want to write back to.
6064

6165
```python
6266
# Write a Spark DataFrame into a Cosmos DB container
@@ -86,8 +90,9 @@ df.write.format("cosmos.oltp").
8690
```
8791

8892
## Load streaming DataFrame from container
93+
In this gesture, you'll use Spark Streaming capability to load data from a container into a dataframe. The data will be stored in the primary data lake account (and file system) that you connected to the workspace.
8994

90-
In this gesture, you will use Spark Streaming capability to load data from a container into a dataframe. The data will be stored into the primary data lake account (and file system) that you connected to the workspace. If the folder /localReadCheckpointFolder does not exist, it will be automatically created. This operation will impact the transactional performance of Cosmos DB.
95+
If the folder */localReadCheckpointFolder* isn't created, it will be automatically created. This operation will impact the transactional performance of Cosmos DB.
9196

9297
```python
9398
# To select a preferred list of regions in a multi-region Cosmos DB account, add .option("spark.cosmos.preferredRegions", "<Region1>,<Region2>")
@@ -119,8 +124,7 @@ val dfStream = spark.readStream.
119124
```
120125

121126
## Write streaming DataFrame to container
122-
123-
In this gesture, you will write a streaming dataframe into the Cosmos DB container you selected. If the folder /localReadCheckpointFolder does not exist, it will be automatically created. This operation will impact the transactional performance of Cosmos DB.
127+
In this gesture, you'll write a streaming dataframe into the Cosmos DB container you selected. If the folder */localReadCheckpointFolder* isn't created, it will be automatically created. This operation will impact the transactional performance of Cosmos DB.
124128

125129
```python
126130
# To select a preferred list of regions in a multi-region Cosmos DB account, add .option("spark.cosmos.preferredRegions", "<Region1>,<Region2>")
@@ -154,8 +158,7 @@ val query = dfStream.
154158

155159
query.awaitTermination()
156160
```
157-
158161
## Next steps
159162

160-
- [Learn more about Cosmos DB Analytical Store]
161-
<!-- (../cosmos-db/analytical-store-introduction) -->
163+
* [Learn what is supported between Synapse and Azure Cosmos DB](./concept-synapse-link-cosmos-db-support.md)
164+
* [Connect to Synapse Link for Cosmos DB](../quickstart-connect-synapse-link-cosmos-db.md)

0 commit comments

Comments
 (0)