Skip to content

Commit 69110be

Browse files
committed
arnaud articles
1 parent a5071d2 commit 69110be

File tree

3 files changed

+22
-10
lines changed

3 files changed

+22
-10
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Here is list of the currently supported features within Synapse Link for Cosmos
3333
| **Read** |Read data from an Azure Cosmos DB container| OLTP / HTAP | HTAP |
3434
| **Write** |Write data from run-time into an Azure Cosmos DB container| OLTP | n/a |
3535

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.
3737
* SQL pool integration through external tables is currently not supported.
3838

3939
## Supported code-generated actions for Spark
@@ -51,7 +51,6 @@ Here is list of the currently supported features within Synapse Link for Cosmos
5151
## Supported code-generated actions for SQL serverless
5252

5353
| Gesture | Description |OLTP |HTAP |
54-
=======
5554
| :-------------------- | :----------------------------------------------------------- |:----------------------------------------------------------- |:----------------------------------------------------------- |
5655
| **Select top 100** |Preview top 100 items from a container|X||
5756
| **Create view** |Create a view to directly have BI access in a container through Synapse SQL|X||

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

Lines changed: 1 addition & 1 deletion
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)

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

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

1414
# Query Cosmos DB analytical 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. They 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 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.
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>")
@@ -32,7 +34,9 @@ df = spark.read.format("cosmos.olap")\
3234

3335
## Create Spark table
3436

35-
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.
3640

3741
```sql
3842
%%sql
@@ -45,7 +49,9 @@ create table call_center using cosmos.olap options (
4549
```
4650

4751
## Write DataFrame to container
48-
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.
4955

5056
```python
5157
# Write a Spark DataFrame into a Cosmos DB container
@@ -61,7 +67,9 @@ YOURDATAFRAME.write.format("cosmos.oltp")\
6167
```
6268

6369
## Load streaming DataFrame from container
64-
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.
6573

6674
```python
6775
# 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\
7886
```
7987

8088
## 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.
8290

8391
```python
8492
# 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\
94102
.start()
95103

96104
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

Comments
 (0)