Skip to content

Commit ea15bda

Browse files
authored
Merge pull request #92996 from lucygoldbergmicrosoft/smallfixfore2e
cr fixes
2 parents 93a199b + 5ddd8a2 commit ea15bda

File tree

5 files changed

+56
-56
lines changed

5 files changed

+56
-56
lines changed

articles/data-explorer/end-to-end-csharp.md

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -151,44 +151,44 @@ await kustoManagementClient.DataConnections.CreateOrUpdateAsync(resourceGroupNam
151151

152152
1. Upload a file into the storage account
153153

154-
```csharp
155-
string storageConnectionString = "DefaultEndpointsProtocol=https;AccountName=xxxxxxxxxxxxxx;AccountKey=xxxxxxxxxxxxxx;EndpointSuffix=core.windows.net";
156-
var cloudStorageAccount = CloudStorageAccount.Parse(storageConnectionString);
157-
CloudBlobClient blobClient = cloudStorageAccount.CreateCloudBlobClient();
158-
CloudBlobContainer container = blobClient.GetContainerReference(storageContainerName);
159-
CloudBlockBlob blockBlob = container.GetBlockBlobReference("test.csv");
160-
var blobContent = @"2007-01-01 00:00:00.0000000,2592,Several trees down
161-
2007-01-01 00:00:00.0000000,4171,Winter Storm";
162-
await blockBlob.UploadTextAsync(blobContent);
163-
```
164-
|**Setting** | **Field description**|
165-
|---|---|---|
166-
| storageConnectionString | The connection string of the programmatically created storage account.|
154+
```csharp
155+
string storageConnectionString = "DefaultEndpointsProtocol=https;AccountName=xxxxxxxxxxxxxx;AccountKey=xxxxxxxxxxxxxx;EndpointSuffix=core.windows.net";
156+
var cloudStorageAccount = CloudStorageAccount.Parse(storageConnectionString);
157+
CloudBlobClient blobClient = cloudStorageAccount.CreateCloudBlobClient();
158+
CloudBlobContainer container = blobClient.GetContainerReference(storageContainerName);
159+
CloudBlockBlob blockBlob = container.GetBlockBlobReference("test.csv");
160+
var blobContent = @"2007-01-01 00:00:00.0000000,2592,Several trees down
161+
2007-01-01 00:00:00.0000000,4171,Winter Storm";
162+
await blockBlob.UploadTextAsync(blobContent);
163+
```
164+
|**Setting** | **Field description**|
165+
|---|---|---|
166+
| storageConnectionString | The connection string of the programmatically created storage account.|
167167

168168
2. Run a test query in Azure Data Explorer
169169

170-
```csharp
171-
var kustoUri = $"https://{kustoClusterName}.{locationSmallCase}.kusto.windows.net";
172-
var kustoConnectionStringBuilder = new KustoConnectionStringBuilder(kustoUri)
173-
{
174-
InitialCatalog = kustoDatabaseName,
175-
FederatedSecurity = true,
176-
ApplicationClientId = clientId,
177-
ApplicationKey = clientSecret,
178-
Authority = tenantId
179-
};
180-
using (var kustoClient = KustoClientFactory.CreateCslQueryProvider(kustoConnectionStringBuilder))
181-
{
182-
var query = $"{kustoTableName} | take 10";
183-
using (var reader = kustoClient.ExecuteQuery(query) as DataTableReader2)
184-
{// Print the contents of each of the result sets.
185-
while (reader.Read())
186-
{
187-
Console.WriteLine($"{reader[0]}, {reader[1]}, {reader[2]}");
170+
```csharp
171+
var kustoUri = $"https://{kustoClusterName}.{locationSmallCase}.kusto.windows.net";
172+
var kustoConnectionStringBuilder = new KustoConnectionStringBuilder(kustoUri)
173+
{
174+
InitialCatalog = kustoDatabaseName,
175+
FederatedSecurity = true,
176+
ApplicationClientId = clientId,
177+
ApplicationKey = clientSecret,
178+
Authority = tenantId
179+
};
180+
using (var kustoClient = KustoClientFactory.CreateCslQueryProvider(kustoConnectionStringBuilder))
181+
{
182+
var query = $"{kustoTableName} | take 10";
183+
using (var reader = kustoClient.ExecuteQuery(query) as DataTableReader2)
184+
{// Print the contents of each of the result sets.
185+
while (reader.Read())
186+
{
187+
Console.WriteLine($"{reader[0]}, {reader[1]}, {reader[2]}");
188+
}
188189
}
189190
}
190-
}
191-
```
191+
```
192192

193193
## Clean up resources
194194

articles/data-explorer/end-to-end-python.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -173,28 +173,28 @@ poller.wait()
173173

174174
1. Upload a file into the storage account
175175

176-
```python
177-
account_key = "xxxxxxxxxxxxxx"
178-
block_blob_service = BlockBlobService(account_name=storage_account_name, account_key=account_key)
179-
blob_name = "test.csv"
180-
blob_content = """2007-01-01 00:00:00.0000000,2592,Several trees down
181-
2007-01-01 00:00:00.0000000,4171,Winter Storm"""
182-
block_blob_service.create_blob_from_text(container_name=storage_container_name, blob_name=blob_name, text=blob_content)
183-
```
184-
|**Setting** | **Field description**|
185-
|---|---|---|
186-
| account_key | The access key of the programmatically created storage account.|
176+
```python
177+
account_key = "xxxxxxxxxxxxxx"
178+
block_blob_service = BlockBlobService(account_name=storage_account_name, account_key=account_key)
179+
blob_name = "test.csv"
180+
blob_content = """2007-01-01 00:00:00.0000000,2592,Several trees down
181+
2007-01-01 00:00:00.0000000,4171,Winter Storm"""
182+
block_blob_service.create_blob_from_text(container_name=storage_container_name, blob_name=blob_name, text=blob_content)
183+
```
184+
|**Setting** | **Field description**|
185+
|---|---|---|
186+
| account_key | The access key of the programmatically created storage account.|
187187

188188
2. Run a test query in Azure Data Explorer
189189

190-
```python
191-
kusto_uri = "https://{}.{}.kusto.windows.net".format(kusto_cluster_name, location_small_case)
192-
kusto_connection_string_builder = KustoConnectionStringBuilder.with_aad_application_key_authentication(connection_string=kusto_uri, aad_app_id=client_id, app_key=client_secret, authority_id=tenant_id)
193-
kusto_client = KustoClient(kusto_connection_string_builder)
194-
query = "{} | take 10".format(kusto_table_name)
195-
response = kusto_client.execute_query(kusto_database_name, query)
196-
print(response.primary_results[0].rows_count)
197-
```
190+
```python
191+
kusto_uri = "https://{}.{}.kusto.windows.net".format(kusto_cluster_name, location_small_case)
192+
kusto_connection_string_builder = KustoConnectionStringBuilder.with_aad_application_key_authentication(connection_string=kusto_uri, aad_app_id=client_id, app_key=client_secret, authority_id=tenant_id)
193+
kusto_client = KustoClient(kusto_connection_string_builder)
194+
query = "{} | take 10".format(kusto_table_name)
195+
response = kusto_client.execute_query(kusto_database_name, query)
196+
print(response.primary_results[0].rows_count)
197+
```
198198

199199
## Clean up resources
200200

articles/data-explorer/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
href: web-query-data.md
1616
- name: Tutorials
1717
items:
18-
- name: E2E Programmatic Blob ingestion
18+
- name: E2E programmatic Blob ingestion
1919
items:
2020
- name: C#
2121
href: end-to-end-csharp.md

includes/data-explorer-data-connection-install-nuget-csharp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ ms.author: orspodek
88

99
## Install C# nuget
1010

11-
* Install the [Azure Data Explorer (Kusto) nuget package](https://www.nuget.org/packages/Microsoft.Azure.Management.Kusto/).
11+
* Install the [Azure Data Explorer (Kusto) NuGet package](https://www.nuget.org/packages/Microsoft.Azure.Management.Kusto/).
1212

13-
* Install the [Microsoft.IdentityModel.Clients.ActiveDirectory nuget package](https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory/) for authentication.
13+
* Install the [Microsoft.IdentityModel.Clients.ActiveDirectory NuGet package](https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory/) for authentication.

includes/data-explorer-e2e-event-grid-resource-template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.author: lugoldbe
88

99
## Azure Resource Manager template
1010

11-
In this article, an Azure Resource Manager template is used to create all the azure resources, a storage account, a container, an event hub, an azure data explorer cluster, and a database. Save the following content into a file with name `template.json`, which will be used to run the code example.
11+
In this article, an Azure Resource Manager template is used to create a resource group, a storage account and container, an Event Hub, and an Azure Data Explorer cluster and database. Save the following content into a file with name `template.json`, which will be used to run the code example.
1212

1313
```json
1414
{

0 commit comments

Comments
 (0)