Skip to content

Commit b9225c0

Browse files
Merge pull request #2527 from MicrosoftDocs/main638736627554398432sync_temp
For protected branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents d5d7a41 + 1ab10bd commit b9225c0

File tree

10 files changed

+264
-134
lines changed

10 files changed

+264
-134
lines changed

.github/pull_request_template.md

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,20 @@
1-
# Thank you for contributing to Azure Data Explorer documentation
1+
# Thank you for contributing to Kusto documentation
22

3-
## Fill out these items before submitting your pull request:
3+
Please add a brief comment outlining the purpose of this PR. Add links to any relevant references such as DevOps work items.
44

5-
If you are working internally at Microsoft:
5+
## Make sure you've done the following:
66

7-
- **Provide a link to an Azure DevOps Boards work item that tracks this feature/update.**
7+
1. **Acrolinx:** Make sure your Acrolinx score is **at least 80** (higher is better) and with **0** spelling issues.
8+
1. **Successful build**: Review the build status to make sure **all files are green** (Succeeded) and there are no errors, warnings, or suggestions.
9+
1. **Preview the pages:**: Click each **Preview URL** link, scan the entire page looking for formatting issues, in particular the parts you edited.
10+
1. **Check the Table of Contents:** If you are adding a new markdown file, make sure it is linked from the table of contents.
11+
1. **Sign off**: Once the PR is finalized, add a comment with `#sign-off` . If you need to cancel the sign-off, add a comment with `#hold-off`.
812

9-
- **Who is your Docs team contact?** \@mention them individually tag them and let them review the PR before signing off.
13+
**NOTE**: *Signing off means the document can be published at any time.*
1014

11-
## For internal Microsoft contributors, check off these quality control items as you go
15+
## Next steps
1216

13-
- [ ] 1. **Check the Acrolinx report:** Make sure your Acrolinx Total score is **above 80 minimum** (higher is better) and with no spelling issues. Acrolinx ensures we are providing consistent terminology and using an appropriate voice and tone, and helps with localization.
17+
- All PRs to this repository are reviewed and merged by a human. Automatic merge is disabled on this repository for PRs, even with the qualifies-for-auto-merge label.
18+
- Once all feedback on the PR is addressed, the PR will be merged into the main branch.
1419

15-
- [ ] 2. **Successful build with no warnings or suggestions**: Review the build status to make sure **all files are green** (Succeeded).
16-
17-
- [ ] 3. **Preview the pages:**: Click each **Preview URL** link to view the rendered HTML pages on the review.learn.microsoft.com site to check the formatting and alignment of the page. Scan the page for overall formatting, and look at the parts you edited in detail.
18-
19-
- [ ] 4. **Check the Table of Contents:** If you are adding a new markdown file, make sure it is linked from the table of contents.
20-
21-
- [ ] 5. **#sign-off to request PR review and merge**: Once the pull request is finalized and ready to be merged, indicate so by typing `#sign-off` in a new comment in the Pull Request. If you need to cancel that sign-off, type `#hold-off` instead. *Signing off means the document can be published at any time.* Note, this is a formatting and standards review, not a technical review.
22-
23-
## Merge and publish
24-
25-
- After you `#sign-off`, there is a separate PR Review team that will review the PR and describe any necessary feedback before merging.
26-
- The review team will use the comments section in the PR to provide feedback if changes are needed. Address any blocking issues and sign off again to request another review.
27-
- Once all feedback is resolved, you can `#sign-off` again. The PR Review team reviews and merges the pull request into the specified branch (usually the *main( branch or a *release-branch*).
28-
- From the *main* branch, the change is merged into the *live* branch several times a day to publish it to the public learn.microsoft.com site.
20+
[Learn more about how to contribute](https://review.learn.microsoft.com/en-us/help/platform/?branch=main).
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
ms.topic: include
3+
ms.date: 01/22/2025
4+
---
5+
6+
:::moniker range="azure-data-explorer"
7+
> The examples in this article use publicly available tables in the [help cluster](https://dataexplorer.azure.com/clusters/help/), such as the `StormEvents` table in the *Samples* database.
8+
::: moniker-end
9+
:::moniker range="microsoft-fabric"
10+
> The examples in this article use publicly available tables, such as the `StormEvents` table in the Weather analytics [sample data](/fabric/real-time-intelligence/sample-gallery).
11+
::: moniker-end

data-explorer/kusto/query/alias-statement.md

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,55 +3,46 @@ title: Alias statement
33
description: Learn how to use an alias statement to define an alias for a database that is used for a query.
44
ms.reviewer: alexans
55
ms.topic: reference
6-
ms.date: 01/12/2025
6+
ms.date: 01/21/2025
77
---
88
# Alias statement
99

1010
> [!INCLUDE [applies](../includes/applies-to-version/applies.md)] [!INCLUDE [fabric](../includes/applies-to-version/fabric.md)] [!INCLUDE [azure-data-explorer](../includes/applies-to-version/azure-data-explorer.md)] [!INCLUDE [monitor](../includes/applies-to-version/monitor.md)] [!INCLUDE [sentinel](../includes/applies-to-version/sentinel.md)]
1111
1212
Alias statements allow you to define an alias for a database, which can be used in the same query.
1313

14-
:::moniker range="azure-data-explorer"
15-
This is useful when you're working with several clusters but want to appear as if you're working on fewer clusters.
16-
The alias must be defined according to the following syntax, where *clustername* and *databasename* are existing and valid entities.
17-
18-
19-
## Syntax
20-
21-
`alias` database *DatabaseAliasName* `=` cluster("https://*clustername*.kusto.windows.net").database("*DatabaseName*")
22-
::: moniker-end
23-
24-
:::moniker range="microsoft-fabric"
25-
This is useful when you're working with several Eventhouses but want to appear as if you're working on fewer Eventhouses.
26-
The alias must be defined according to the following syntax, where *Eventhouse* and *databasename* are existing and valid entities.
14+
The `alias` statement is useful as a shorthand name for a database so it can be referenced using that alias in the same query.
2715

2816
## Syntax
2917

30-
`alias` database *DatabaseAliasName* `=` cluster("*serviceURL*").database("*DatabaseName*")
31-
::: moniker-end
18+
`alias` database *DatabaseAliasName* `=` cluster("QueryURI").database("*DatabaseName*")
3219

3320
[!INCLUDE [syntax-conventions-note](../includes/syntax-conventions-note.md)]
3421

3522
## Parameters
3623

37-
|Name|Type|Required|Description|
24+
| Name | Type | Required | Description |
3825
|--|--|--|--|
39-
|*DatabaseAliasName*| `string` | :heavy_check_mark:|An existing name or new database alias name. You can escape the name with brackets. For example, ["Name with spaces"]. |
40-
|*DatabaseName*| `string` | :heavy_check_mark:|The name of the database to give an alias.|
26+
| *DatabaseAliasName* | `string` | :heavy_check_mark: | An existing name or new database alias name. You can escape the name with brackets. For example, ["Name with spaces"]. |
27+
| *QueryURI* | `string` | :heavy_check_mark: | The URI that can be used to run queries or management commands. |
28+
| *DatabaseName* | `string` | :heavy_check_mark: | The name of the database to give an alias. |
4129

4230
:::moniker range="azure-data-explorer"
4331
> [!NOTE]
44-
> The mapped cluster-uri and the mapped database-name must appear inside double-quotes(") or single-quotes(').
32+
>
33+
> - To get your Query URI, in the Azure portal, go to your cluster's overview page, and then copy the URI.
34+
> - The mapped Query and the mapped database-name must appear inside double-quotes(") or single-quotes(').
4535
::: moniker-end
46-
4736
:::moniker range="microsoft-fabric"
4837
> [!NOTE]
49-
> The mapped Eventhouse-uri and the mapped database-name must appear inside double-quotes(") or single-quotes(').
38+
>
39+
> - To get your Query URI, see [Copy a KQL database URI](/fabric/real-time-intelligence/access-database-copy-uri#copy-uri).
40+
> - The mapped Query and the mapped database-name must appear inside double-quotes(") or single-quotes(').
5041
::: moniker-end
5142

5243
## Examples
5344

54-
[!INCLUDE [help-cluster](../includes/help-cluster-samples-stormevents.md)]
45+
[!INCLUDE [help-cluster](../includes/help-cluster-note.md)]
5546

5647
First, count the number of records in that table.
5748

data-explorer/kusto/query/as-operator.md

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ title: as operator
33
description: Learn how to use the as operator to bind a name to the operator's input tabular expression.
44
ms.reviewer: alexans
55
ms.topic: reference
6-
ms.date: 08/11/2024
6+
ms.date: 01/27/2025
77
---
88
# as operator
99

1010
> [!INCLUDE [applies](../includes/applies-to-version/applies.md)] [!INCLUDE [fabric](../includes/applies-to-version/fabric.md)] [!INCLUDE [azure-data-explorer](../includes/applies-to-version/azure-data-explorer.md)] [!INCLUDE [monitor](../includes/applies-to-version/monitor.md)] [!INCLUDE [sentinel](../includes/applies-to-version/sentinel.md)]
1111
12-
Binds a name to the operator's input tabular expression. This allows the query to reference the value of the tabular expression multiple times without breaking the query and binding a name through the [let statement](let-statement.md).
12+
Binds a name to the operator's input tabular expression. This operator allows the query to reference the value of the tabular expression multiple times without breaking the query and binding a name through the [let statement](let-statement.md).
1313

1414
To optimize multiple uses of the `as` operator within a single query, see [Named expressions](named-expressions.md).
1515

@@ -25,42 +25,57 @@ To optimize multiple uses of the `as` operator within a single query, see [Named
2525
|--|--|--|--|
2626
|*T*| `string` | :heavy_check_mark: | The tabular expression to rename.|
2727
| *Name*| `string` | :heavy_check_mark: | The temporary name for the tabular expression.|
28-
| *`hint.materialized`*| `bool` | | If *Materialized* is set to `true`, the value of the tabular expression will be as if it was wrapped by a [materialize()](materialize-function.md) function call. Otherwise, the value will be recalculated on every reference.|
28+
| *`hint.materialized`*| `bool` | | If *Materialized* is set to `true`, the value of the tabular expression output is wrapped by a [materialize()](materialize-function.md) function call. Otherwise, the value is recalculated on every reference.|
2929

3030
> [!NOTE]
3131
>
32-
> * The name given by `as` will be used in the `withsource=` column of [union](union-operator.md), the `source_` column of [find](find-operator.md), and the `$table` column of [search](search-operator.md).
32+
> * The name given by `as` is used in the `withsource=` column of [union](union-operator.md), the `source_` column of [find](find-operator.md), and the `$table` column of [search](search-operator.md).
3333
> * The tabular expression named using the operator in a [join](join-operator.md)'s outer tabular input (`$left`) can also be used in the join's tabular inner input (`$right`).
3434
3535
## Examples
3636

37-
In the following two examples the union's generated TableName column will consist of 'T1' and 'T2'.
37+
In the following two examples, the generated TableName column consists of 'T1' and 'T2'.
3838

3939
:::moniker range="azure-data-explorer"
4040
> [!div class="nextstepaction"]
41-
> <a href="https://dataexplorer.azure.com/?query=H4sIAAAAAAAAAytKzEtPVahQSCvKz1UwVCjJVzA0UCguSS0AcrhqFBKLFULAjNK8zPw8hfLMkozi/NKi5FTbkMSknFS/xNxUBY0iPGZAjDDSBAAgKK6faAAAAA==" target="_blank">Run the query</a>
41+
> <a href="https://dataexplorer.azure.com/clusters/help/databases/Samples?query=H4sIAAAAAAAAAytKzEtPVahQSCvKz1UwVCjJVzBVKC5JLQCyuWoUEosVQsCM0rzM%2FDyF8sySjOL80qLkVNuQxKScVL%2FE3FQFjSLcRkBMMNIEALyiibJmAAAA" target="_blank">Run the query</a>
4242
::: moniker-end
4343

4444
```kusto
45-
range x from 1 to 10 step 1
45+
range x from 1 to 5 step 1
4646
| as T1
47-
| union withsource=TableName (range x from 1 to 10 step 1 | as T2)
47+
| union withsource=TableName (range x from 1 to 5 step 1 | as T2)
4848
```
4949

5050
Alternatively, you can write the same example as follows:
5151

5252
:::moniker range="azure-data-explorer"
5353
> [!div class="nextstepaction"]
54-
> <a href="https://dataexplorer.azure.com/?query=H4sIAAAAAAAAAyvNy8zPUyjPLMkozi8tSk61DUlMykn1S8xNVdAoSsxLT1WoUEgrys9VMFQoyVcwNFAoLkktAHJqFBKLFUIMNXWIUWakCQB5tG07ZwAAAA==" target="_blank">Run the query</a>
54+
> <a href="https://dataexplorer.azure.com/clusters/help/databases/Samples?query=H4sIAAAAAAAAAyvNy8zPUyjPLMkozi8tSk61DUlMykn1S8xNVdAoSsxLT1WoUEgrys9VMFQoyVcwVSguSS0AsmsUEosVQgw1dYhQZaQJAJuYIo9lAAAA" target="_blank">Run the query</a>
5555
::: moniker-end
5656

5757
```kusto
58-
union withsource=TableName (range x from 1 to 10 step 1 | as T1), (range x from 1 to 10 step 1 | as T2)
58+
union withsource=TableName (range x from 1 to 5 step 1 | as T1), (range x from 1 to 5 step 1 | as T2)
5959
```
6060

61-
In the following example, the 'left side' of the join will be:
61+
**Output**
62+
63+
| TableName| x |
64+
|--|---|
65+
| T1 | 1 |
66+
| T1 | 2 |
67+
| T1 | 3 |
68+
| T1 | 4 |
69+
| T1 | 5 |
70+
| T2 | 1 |
71+
| T2 | 2 |
72+
| T2 | 3 |
73+
| T2 | 4 |
74+
| T2 | 5 |
75+
76+
In the following example, the 'left side' of the join is:
6277
`MyLogTable` filtered by `type == "Event"` and `Name == "Start"`
63-
and the 'right side' of the join will be:
78+
and the 'right side' of the join is:
6479
`MyLogTable` filtered by `type == "Event"` and `Name == "Stop"`
6580

6681
```kusto

data-explorer/kusto/query/batches.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Batches
33
description: This article describes Batches.
44
ms.reviewer: alexans
55
ms.topic: reference
6-
ms.date: 01/13/2025
6+
ms.date: 01/27/2025
77
---
88
# Batches
99

@@ -18,7 +18,9 @@ A query can include multiple tabular expression statements, as long as they're d
1818
1919
## Examples
2020

21-
[!INCLUDE [help-cluster](../includes/help-cluster-samples-stormevents.md)]
21+
[!INCLUDE [help-cluster](../includes/help-cluster-note.md)]
22+
23+
The following examples show how to create multiple tables simultaneously.
2224

2325
### Name tabular results
2426

data-explorer/kusto/query/count-operator.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@ title: count operator
33
description: Learn how to use the count operator to return the number of records in the input record set.
44
ms.reviewer: alexans
55
ms.topic: reference
6-
ms.date: 08/11/2024
7-
monikerRange: "microsoft-fabric || azure-data-explorer || azure-monitor || microsoft-sentinel "
6+
ms.date: 01/15/2025
87
---
98
# count operator
109

1110
> [!INCLUDE [applies](../includes/applies-to-version/applies.md)] [!INCLUDE [fabric](../includes/applies-to-version/fabric.md)] [!INCLUDE [azure-data-explorer](../includes/applies-to-version/azure-data-explorer.md)] [!INCLUDE [monitor](../includes/applies-to-version/monitor.md)] [!INCLUDE [sentinel](../includes/applies-to-version/sentinel.md)]
1211
13-
1412
Returns the number of records in the input record set.
1513

1614
## Syntax
@@ -32,6 +30,10 @@ This function returns a table with a single record and column of type
3230

3331
## Example
3432

33+
[!INCLUDE [help-cluster](../includes/help-cluster-note.md)]
34+
35+
When you use the count operator with a table name, like StormEvents, it will return the total number of records in that table.
36+
3537
:::moniker range="azure-data-explorer"
3638
> [!div class="nextstepaction"]
3739
> <a href="https://dataexplorer.azure.com/clusters/help/databases/Samples?query=H4sIAAAAAAAAAwsuyS/KdS1LzSspVqhRSM4vzSsBALU2eHsTAAAA" target="_blank">Run the query</a>
@@ -41,6 +43,12 @@ This function returns a table with a single record and column of type
4143
StormEvents | count
4244
```
4345

46+
**Output**
47+
48+
| Count |
49+
|-------|
50+
| 59066 |
51+
4452
## Related content
4553

4654
For information about the count() aggregation function, see [count() (aggregation function)](count-aggregation-function.md).

data-explorer/kusto/query/datatable-operator.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: datatable operator
33
description: Learn how to use the datatable operator to define a table with given schema and data.
44
ms.reviewer: alexans
55
ms.topic: reference
6-
ms.date: 01/07/2025
6+
ms.date: 01/21/2025
77
---
88
# datatable operator
99

@@ -37,6 +37,8 @@ This operator returns a data table of the given schema and data.
3737

3838
## Example
3939

40+
This example creates a table with *Date*, *Event*, and *MoreData* columns, filters rows with Event descriptions longer than 4 characters, and adds a new column *key2* to each row from the MoreData dynamic object.
41+
4042
:::moniker range="azure-data-explorer"
4143
> [!div class="nextstepaction"]
4244
> <a href="https://dataexplorer.azure.com/clusters/help/databases/Samples?query=H4sIAAAAAAAAA3XRS4vCMBAA4Lu/YsiphbiY1upa0IPYo8velz2kZtRgTCCNL1z/uxNZd6HYJAQyj++QUTLQrg0mCxmwVHQFvUcO1RFtKJvgtd1wWDqPVCBLdbFyr1cpfPWA1rM+ERMx6A9GfSFSDmzuvGUcfouTK9vhRbCSHaU5oKBMDGTPQMZuKW9zOXGCTuQqG9A3UK2cQfiQ1ISdet7Wh6/0Iv/XPw+10c0WFay1bwLUzu06+aLNj17xk3H8i6yI/EKj6uTGbe79wX33fuC0RY9AAzBok8c0UpjBkDJ4DmgVxDaY/o3mLb7vp72pd88BAAA=" target="_blank">Run the query</a>
@@ -55,7 +57,7 @@ datatable(Date:datetime, Event:string, MoreData:dynamic) [
5557

5658
**Output**
5759

58-
|Date|Event|MoreData|key2|
59-
|---|---|---|---|
60-
|1930-01-01 00:00:00.0000000|Enters Ecole Navale|{<br> "key1": "value3",<br> "key2": "value4"<br>}|value4|
61-
|1953-01-01 00:00:00.0000000|Published first book|{<br> "key1": "value5",<br> "key2": "value6"<br>}|value6|
60+
| Date | Event | MoreData | key2 |
61+
|--|--|--|--|
62+
| 1930-01-01 00:00:00.0000000 | Enters Ecole Navale | {<br> "key1": "value3",<br> "key2": "value4"<br>} | value4 |
63+
| 1953-01-01 00:00:00.0000000 | Published first book | {<br> "key1": "value5",<br> "key2": "value6"<br>} | value6 |

data-explorer/kusto/query/externaldata-operator.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ title: externaldata operator
33
description: Learn how to use the externaldata operator to return a data table of the given schema whose data was parsed from the specified storage artifact.
44
ms.reviewer: alexans
55
ms.topic: reference
6-
ms.date: 08/11/2024
7-
monikerRange: "microsoft-fabric || azure-data-explorer || azure-monitor || microsoft-sentinel"
6+
ms.date: 01/27/2025
87
---
98
# externaldata operator
109

@@ -13,14 +12,10 @@ monikerRange: "microsoft-fabric || azure-data-explorer || azure-monitor || micro
1312
The `externaldata` operator returns a table whose schema is defined in the query itself, and whose data is read from an external storage artifact, such as a blob in Azure Blob Storage or a file in Azure Data Lake Storage.
1413

1514
> [!NOTE]
16-
> The `externaldata` operator supports a specific set of storage services, as listed under [Storage connection strings](../api/connection-strings/storage-connection-strings.md).
17-
18-
> [!NOTE]
19-
> The `externaldata` operator supports Shared Access Signature (SAS) key, Access key, and Microsoft Entra Token authentication methods. For more information, see [Storage authentication methods](../api/connection-strings/storage-connection-strings.md).
20-
21-
::: moniker range="microsoft-fabric || azure-data-explorer"
22-
23-
::: moniker-end
15+
> The `externaldata` operator supports:
16+
>
17+
> * a specific set of storage services, as listed under [Storage connection strings](../api/connection-strings/storage-connection-strings.md).
18+
> * shared Access Signature (SAS) key, Access key, and Microsoft Entra Token authentication methods. For more information, see [Storage authentication methods](../api/connection-strings/storage-connection-strings.md#storage-authentication-methods).
2419
2520
::: moniker range="azure-monitor || microsoft-sentinel"
2621

@@ -48,9 +43,9 @@ The `externaldata` operator returns a table whose schema is defined in the query
4843

4944
### Supported properties
5045

51-
| Property | Type | Description |
52-
|------------------|----------|-------------------|
53-
| format | `string` | The data format. If unspecified, an attempt is made to detect the data format from file extension. The default is `CSV`. All [ingestion data formats](../ingestion-supported-formats.md) are supported. |
46+
| Property | Type | Description |
47+
|--|--|--|
48+
| format | `string` | The data format. If unspecified, an attempt is made to detect the data format from file extension. The default is `CSV`. All [ingestion data formats](../ingestion-supported-formats.md) are supported. |
5449
| ignoreFirstRecord | `bool` | If set to `true`, the first record in every file is ignored. This property is useful when querying CSV files with headers. |
5550
| ingestionMapping | `string` | Indicates how to map data from the source file to the actual columns in the operator result set. See [data mappings](../management/mappings.md). |
5651

@@ -66,6 +61,8 @@ The `externaldata` operator returns a data table of the given schema whose data
6661

6762
## Examples
6863

64+
The examples query data in an external storage file.
65+
6966
### Fetch a list of user IDs stored in Azure Blob Storage
7067

7168
The following example shows how to find all records in a table whose `UserID` column falls into a known set of IDs, held (one per line) in an external storage file. Since the data format isn't specified, the detected data format is `TXT`.
@@ -134,4 +131,6 @@ with(format='multijson', ingestionMapping='[{"Column":"Timestamp","Properties":{
134131

135132
The `MultiJSON` format is used here because single JSON records are spanned into multiple lines.
136133

134+
## Related content
135+
137136
For more info on mapping syntax, see [data mappings](../management/mappings.md).

0 commit comments

Comments
 (0)