Skip to content

Commit 9dd9d44

Browse files
authored
Merge pull request #102659 from docohe/user/docohe/fix-database-docs
Update Kusto create a database docs
2 parents 1ab24e0 + 3830f1d commit 9dd9d44

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

articles/data-explorer/create-cluster-database-csharp.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,14 @@ If the result contains `ProvisioningState` with the `Succeeded` value, then the
9292
var hotCachePeriod = new TimeSpan(3650, 0, 0, 0);
9393
var softDeletePeriod = new TimeSpan(3650, 0, 0, 0);
9494
var databaseName = "mykustodatabase";
95-
var database = new Database(location: location, softDeletePeriod: softDeletePeriod, hotCachePeriod: hotCachePeriod);
95+
var database = new ReadWriteDatabase(location: location, softDeletePeriod: softDeletePeriod, hotCachePeriod: hotCachePeriod);
9696

9797
await kustoManagementClient.Databases.CreateOrUpdateAsync(resourceGroupName, clusterName, databaseName, database);
9898
```
9999

100+
[!NOTE]
101+
If you are using C# version 2.0.0 or below, use Database instead of ReadWriteDatabase.
102+
100103
|**Setting** | **Suggested value** | **Field description**|
101104
|---|---|---|
102105
| clusterName | *mykustocluster* | The name of your cluster where the database will be created.|
@@ -108,7 +111,7 @@ If the result contains `ProvisioningState` with the `Succeeded` value, then the
108111
2. Run the following command to see the database that you created:
109112

110113
```csharp
111-
kustoManagementClient.Databases.Get(resourceGroupName, clusterName, databaseName);
114+
kustoManagementClient.Databases.Get(resourceGroupName, clusterName, databaseName) as ReadWriteDatabase;
112115
```
113116

114117
You now have a cluster and a database.

articles/data-explorer/create-cluster-database-python.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,17 @@ If the result contains `provisioningState` with the `Succeeded` value, then the
105105
databaseName="mykustodatabase"
106106

107107
database_operations = kusto_management_client.databases
108-
_database = Database(location=location,
108+
_database = ReadWriteDatabase(location=location,
109109
soft_delete_period=softDeletePeriod,
110110
hot_cache_period=hotCachePeriod)
111111

112112
#Returns an instance of LROPoller, see https://docs.microsoft.com/python/api/msrest/msrest.polling.lropoller?view=azure-python
113113
poller =database_operations.create_or_update(resource_group_name = resource_group_name, cluster_name = clusterName, database_name = databaseName, parameters = _database)
114114
```
115115

116+
[!NOTE]
117+
If you are using Python version 0.4.0 or below, use Database instead of ReadWriteDatabase.
118+
116119
|**Setting** | **Suggested value** | **Field description**|
117120
|---|---|---|
118121
| cluster_name | *mykustocluster* | The name of your cluster where the database will be created.|

0 commit comments

Comments
 (0)