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/synapse-link/concept-synapse-link-cosmos-db-support.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ Here is list of the currently supported features within Synapse Link for Cosmos
33
33
|**Read**|Read data from an Azure Cosmos DB container| OLTP / HTAP | HTAP |
34
34
|**Write**|Write data from run-time into an Azure Cosmos DB container| OLTP | n/a |
35
35
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.
36
+
* 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.
37
37
* SQL pool integration through external tables is currently not supported.
38
38
39
39
## Supported code-generated actions for Spark
@@ -51,7 +51,6 @@ Here is list of the currently supported features within Synapse Link for Cosmos
51
51
## Supported code-generated actions for SQL serverless
Copy file name to clipboardExpand all lines: articles/synapse-analytics/synapse-link/how-to-connect-synapse-link-cosmos-db.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ This article describes how to access an Azure Cosmos DB database from Azure Syna
17
17
18
18
## Prerequisites
19
19
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:
21
21
22
22
* 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)
23
23
* Existing Synapse workspace or create a new workspace following this [quickstart](https://docs.microsoft.com/azure/synapse-analytics/quickstart-create-workspace)
Copy file name to clipboardExpand all lines: articles/synapse-analytics/synapse-link/how-to-query-analytical-store-spark.md
+20-7Lines changed: 20 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,11 +13,13 @@ ms.reviewer: jrasnick
13
13
14
14
# Query Cosmos DB analytical with Synapse Spark
15
15
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. They are also perfect for discovering data with a single click.
17
17
18
18
## Load to DataFrame
19
19
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 into dataframe, you can perform additional analysis. This operation does not impact the transactional store.
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 into dataframe, you can perform additional analysis.
21
+
22
+
This operation does not impact the transactional store.
21
23
22
24
```python
23
25
# To select a preferred list of regions in a multi-region Cosmos DB account, add .option("spark.cosmos.preferredRegions", "<Region1>,<Region2>")
In this gesture, you will create a Spark table pointing to the container you selected. That operation does not incur any data movement. If you decide to delete that 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 for the run-time.
37
+
In this gesture, you will create a Spark table pointing to the container you selected. That operation does not incur any data movement. If you decide to delete that table, the underlying container (and corresponding analytical store) won't be impacted.
38
+
39
+
This scenario is convenient to reuse tables through third-party tools and provide accessibility to the data for the run-time.
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.
52
+
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.
53
+
54
+
Make sure that you replace **YOURDATAFRAME** by the dataframe that you want to write back.
49
55
50
56
```python
51
57
# Write a Spark DataFrame into a Cosmos DB container
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 is not created, it will be automatically created. This operation will impact the transactional performance of Cosmos DB.
70
+
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.
71
+
72
+
If the folder */localReadCheckpointFolder* is not created, it will be automatically created. This operation will impact the transactional performance of Cosmos DB.
65
73
66
74
```python
67
75
# To select a preferred list of regions in a multi-region Cosmos DB account, add .option("spark.cosmos.preferredRegions", "<Region1>,<Region2>")
@@ -78,7 +86,7 @@ dfStream = spark.readStream\
78
86
```
79
87
80
88
## Write streaming DataFrame to container
81
-
In this gesture, you will write a streaming dataframe into the Cosmos DB container you selected. If the folder /localReadCheckpointFolder is not created, it will be automatically created. This operation will impact the transactional performance of Cosmos DB.
89
+
In this gesture, you will write a streaming dataframe into the Cosmos DB container you selected. If the folder */localReadCheckpointFolder* is not created, it will be automatically created. This operation will impact the transactional performance of Cosmos DB.
82
90
83
91
```python
84
92
# To select a preferred list of regions in a multi-region Cosmos DB account, add .option("spark.cosmos.preferredRegions", "<Region1>,<Region2>")
@@ -94,4 +102,9 @@ streamQuery = dfStream\
94
102
.start()
95
103
96
104
streamQuery.awaitTermination()
97
-
```
105
+
```
106
+
107
+
## Next steps
108
+
109
+
*[Learn what is supported between Synapse and Azure Cosmos DB](./concept-synapse-link-cosmos-db-support.md)
110
+
*[Connect to Synapse Link for Cosmos DB](../quickstart-connect-synapse-link-cosmos-db.md)
0 commit comments