Skip to content

Commit cc2fa09

Browse files
authored
Update configure-synapse-link.md
1 parent 139049b commit cc2fa09

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

articles/cosmos-db/configure-synapse-link.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ Use `EnableAnalyticalStorage true` for both **create** or **update** operations.
7777

7878
## <a id="create-analytical-ttl"></a> Create an analytical store enabled container
7979

80-
You can turn on analytical store when creating an Azure Cosmos DB container by setting `analytical TTL` property. While Portal will implicitly set it to `-1`, that means infinite retention of the data, SDKs and command line tools allow you to also use positive integers, that represent the retention in seconds. For information on the various `analytical TTL` config options, see the [analytical TTL supported values](analytical-store-introduction.md#analytical-ttl) article. Please note that you can change `analytical TTL` to another value later.
80+
You can turn on analytical store when creating an Azure Cosmos DB container by using one of the following options.
8181

8282
### Azure portal
8383

8484
1. Sign in to the [Azure portal](https://portal.azure.com/) or the [Azure Cosmos DB Explorer](https://cosmos.azure.com/).
8585

8686
1. Navigate to your Azure Cosmos DB account and open the **Data Explorer** tab.
8787

88-
1. Select **New Container** and enter a name for your database, container, partition key and throughput details. Turn on the **Analytical store** option. After you enable the analytical store, it creates a container with `AnalyicalTTL` property set to the default value of -1 (infinite retention). This analytical store that retains all the historical versions of records.
88+
1. Select **New Container** and enter a name for your database, container, partition key and throughput details. Turn on the **Analytical store** option. After you enable the analytical store, it creates a container with `analytical TTL` property set to the default value of -1 (infinite retention). This analytical store that retains all the historical versions of records and can be changed later.
8989

9090
:::image type="content" source="./media/configure-synapse-link/create-container-analytical-store.png" alt-text="Turn on analytical store for Azure Cosmos DB container":::
9191

@@ -95,9 +95,13 @@ You can turn on analytical store when creating an Azure Cosmos DB container by s
9595

9696
1. After the container is created, verify that analytical store has been enabled by clicking **Settings**, right below Documents in Data Explorer, and check if the **Analytical Store Time to Live** option is turned on.
9797

98-
### .NET SDK
98+
### Azure Cosmos DB SDKs
99+
100+
Set the `analytical TTL` property to the required value. For the list of allowed values, see the [analytical TTL supported values](analytical-store-introduction.md#analytical-ttl) article.
99101

100-
The following code creates a container with analytical store by using the .NET SDK. Set the analytical TTL property to the required value. For the list of allowed values, see the [analytical TTL supported values](analytical-store-introduction.md#analytical-ttl) article:
102+
#### .NET SDK
103+
104+
The following code creates a container with analytical store by using the .NET SDK. Set the `AnalyticalStoreTimeToLiveInSeconds` property to the required value in seconds or use `-1` for infinite retention. This setting can be changed later.
101105

102106
```csharp
103107
// Create a container with a partition key, and analytical TTL configured to -1 (infinite retention)
@@ -111,9 +115,10 @@ CosmosClient cosmosClient = new CosmosClient("myConnectionString");
111115
await cosmosClient.GetDatabase("myDatabase").CreateContainerAsync(properties);
112116
```
113117

114-
### Java V4 SDK
118+
#### Java V4 SDK
119+
120+
The following code creates a container with analytical store by using the Java V4 SDK. Set the `AnalyticalStoreTimeToLiveInSeconds` property to the required value in seconds or use `-1` for infinite retention. This setting can be changed later.
115121

116-
The following code creates a container with analytical store by using the Java V4 SDK. Set the `AnalyticalStoreTimeToLiveInSeconds` property to the required value:
117122

118123
```java
119124
// Create a container with a partition key and analytical TTL configured to -1 (infinite retention)
@@ -124,11 +129,9 @@ containerProperties.setAnalyticalStoreTimeToLiveInSeconds(-1);
124129
container = database.createContainerIfNotExists(containerProperties, 400).block().getContainer();
125130
```
126131

127-
### Python V4 SDK
128-
129-
Python 2.7 and Azure Cosmos DB SDK 4.1.0 are the minimum versions required, and the SDK is only compatible with the SQL API.
132+
#### Python V4 SDK
130133

131-
The first step is to make sure that you are using at least version 4.1.0 of the [Azure Cosmos DB Python SDK](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/cosmos/azure-cosmos):
134+
The following code creates a container with analytical store by using the Python V4 SDK. Set the `analytical_storage_ttl` property to the required value in seconds or use `-1` for infinite retention. This setting can be changed later.
132135

133136
```python
134137
import azure.cosmos as cosmos
@@ -181,18 +184,18 @@ except exceptions.CosmosResourceExistsError:
181184
```
182185
### Command Line Tools
183186

184-
Analytical store is enabled by setting the `analytical TTL` property when you create the new container. For information on the various Analytical TTL config options, see the [analytical TTL supported values](analytical-store-introduction.md#analytical-ttl) article.
187+
Set the `analytical TTL` property to the required value. For the list of allowed values, see the [analytical TTL supported values](analytical-store-introduction.md#analytical-ttl) article.
185188

186189
#### Azure CLI
187190

188-
Use the options below using `--analytical-storage-ttl -1` to enable analytical store with infinite retention for both SQL API containers or MongoDB API collections.
191+
The following options create a container with analytical store by using Azure CLI. Set the `--analytical-storage-ttl` property to the required value in seconds or use `-1` for infinite retention. This setting can be changed later.
189192

190193
* [Create an Azure Cosmos DB MongoDB collection](/cli/azure/cosmosdb/mongodb/collection#az_cosmosdb_mongodb_collection_create-examples)
191194
* [Create an Azure Cosmos DB SQL API container](/cli/azure/cosmosdb/sql/container#az_cosmosdb_sql_container_create)
192195

193196
#### PowerShell
194197

195-
Use the options below using `-AnalyticalStorageTtl -1` to enable analytical store with infinite retention for both SQL API containers or MongoDB API collections.
198+
The following options create a container with analytical store by using PowerShell. Set the `-AnalyticalStorageTtl` property to the required value in seconds or use `-1` for infinite retention. This setting can be changed later.
196199

197200
* [Create an Azure Cosmos DB MongoDB collection](/powershell/module/az.cosmosdb/new-azcosmosdbmongodbcollection#description)
198201
* [Create an Azure Cosmos DB SQL API container](/powershell/module/az.cosmosdb/new-azcosmosdbsqlcontainer)

0 commit comments

Comments
 (0)