Skip to content

Commit 7a23ee7

Browse files
committed
edit pass
1 parent 55901b6 commit 7a23ee7

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

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

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Query Azure Cosmos DB analytical store with Synapse Spark
2+
title: Query Azure Cosmos DB Analytical Store with Synapse Spark
33
description: How to query Cosmos DB analytical with Synapse Spark
44
services: synapse-analytics
55
author: ArnoMicrosoft
@@ -11,13 +11,13 @@ ms.author: acomet
1111
ms.reviewer: jrasnick
1212
---
1313

14-
# Query Azure Cosmos DB analytical store with Synapse Spark
14+
# 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. 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.
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 in a dataframe, you can perform additional analysis. This operation does not impact the transactional store.
2121

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

4343
## Create Spark table
4444

45-
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.
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.
4646

4747
```sql
4848
%%sql
@@ -55,7 +55,8 @@ create table call_center using cosmos.olap options (
5555
```
5656

5757
## Write DataFrame to container
58-
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.
58+
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.
5960

6061
```python
6162
# Write a Spark DataFrame into a Cosmos DB container
@@ -85,7 +86,8 @@ df.write.format("cosmos.oltp").
8586
```
8687

8788
## Load streaming DataFrame from container
88-
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.
89+
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.
8991

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

119121
## Write streaming DataFrame to container
120-
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.
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.
121124

122125
```python
123126
# To select a preferred list of regions in a multi-region Cosmos DB account, add .option("spark.cosmos.preferredRegions", "<Region1>,<Region2>")
@@ -150,4 +153,9 @@ val query = dfStream.
150153
start()
151154

152155
query.awaitTermination()
153-
```
156+
```
157+
158+
## Next steps
159+
160+
- [Learn more about Cosmos DB Analytical Store]
161+
<!-- (../cosmos-db/analytical-store-introduction) -->

0 commit comments

Comments
 (0)