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/cosmos-db/configure-synapse-link.md
+16-13Lines changed: 16 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,15 +77,15 @@ Use `EnableAnalyticalStorage true` for both **create** or **update** operations.
77
77
78
78
## <aid="create-analytical-ttl"></a> Create an analytical store enabled container
79
79
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.
81
81
82
82
### Azure portal
83
83
84
84
1. Sign in to the [Azure portal](https://portal.azure.com/) or the [Azure Cosmos DB Explorer](https://cosmos.azure.com/).
85
85
86
86
1. Navigate to your Azure Cosmos DB account and open the **Data Explorer** tab.
87
87
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.
89
89
90
90
:::image type="content" source="./media/configure-synapse-link/create-container-analytical-store.png" alt-text="Turn on analytical store for Azure Cosmos DB container":::
91
91
@@ -95,9 +95,13 @@ You can turn on analytical store when creating an Azure Cosmos DB container by s
95
95
96
96
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.
97
97
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.
99
101
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.
101
105
102
106
```csharp
103
107
// Create a container with a partition key, and analytical TTL configured to -1 (infinite retention)
@@ -111,9 +115,10 @@ CosmosClient cosmosClient = new CosmosClient("myConnectionString");
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.
115
121
116
-
The following code creates a container with analytical store by using the Java V4 SDK. Set the `AnalyticalStoreTimeToLiveInSeconds` property to the required value:
117
122
118
123
```java
119
124
// Create a container with a partition key and analytical TTL configured to -1 (infinite retention)
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
130
133
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.
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.
185
188
186
189
#### Azure CLI
187
190
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.
189
192
190
193
*[Create an Azure Cosmos DB MongoDB collection](/cli/azure/cosmosdb/mongodb/collection#az_cosmosdb_mongodb_collection_create-examples)
191
194
*[Create an Azure Cosmos DB SQL API container](/cli/azure/cosmosdb/sql/container#az_cosmosdb_sql_container_create)
192
195
193
196
#### PowerShell
194
197
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.
196
199
197
200
*[Create an Azure Cosmos DB MongoDB collection](/powershell/module/az.cosmosdb/new-azcosmosdbmongodbcollection#description)
198
201
*[Create an Azure Cosmos DB SQL API container](/powershell/module/az.cosmosdb/new-azcosmosdbsqlcontainer)
0 commit comments