Skip to content

Commit 024b7e4

Browse files
Merge pull request #50268 from KenMAG/Bugs
Updated per triage app feedback, and improved Acrolinx scores
2 parents 10d26ea + 809a151 commit 024b7e4

File tree

5 files changed

+18
-16
lines changed

5 files changed

+18
-16
lines changed

learn-pr/wwl-sci/construct-kusto-query-language-statements/2-understand-kusto-query-language-statement-structure.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ title: Understand the Kusto Query Language statement structure
44
metadata:
55
title: Understand the Kusto Query Language statement structure
66
description: "Understand the Kusto Query Language statement structure"
7-
ms.date: 02/23/2023
8-
author: wwlpublish
7+
ms.date: 05/02/2025
8+
author: KenMAG
99
ms.author: kelawson
1010
ms.topic: unit
1111
azureSandbox: false

learn-pr/wwl-sci/construct-kusto-query-language-statements/5-use-let-statement.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ title: Use the let statement
44
metadata:
55
title: Use the let statement
66
description: "Use the let statement"
7-
ms.date: 02/23/2023
8-
author: wwlpublish
7+
ms.date: 05/02/2025
8+
author: KenMAG
99
ms.author: kelawson
1010
ms.topic: unit
1111
azureSandbox: false

learn-pr/wwl-sci/construct-kusto-query-language-statements/includes/2-understand-kusto-query-language-statement-structure.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ The tabular expression statement's syntax has tabular data flow from one tabular
66

77
For example, the following query has a single statement, which is a tabular expression statement. The statement starts with a table called SecurityEvent. The EventID column's value filters the data (rows) and then the results are summarized by creating a new column for the count() by Account. Next, in the Prepare phase, the results are then limited to 10 rows.
88

9-
:::image type="content" source="../media/kql-pipe.png" alt-text="Diagram of K Q L Statement showing data, condition and evidence.":::
9+
:::image type="content" source="../media/kql-pipe.png" alt-text="Diagram of K Q L Statement showing data, condition, and evidence.":::
1010

1111
> [!IMPORTANT]
12-
> It is essential to understand how the results flow through the pipe "|". Everything on the left of the pipe is processed then passed to the right of the pipe.
12+
> It's essential to understand how the results flow through the pipe "|". Everything on the left of the pipe is processed then passed to the right of the pipe.
1313
1414
## Access the Log Analytics demo environment
1515

16-
Microsoft provides access to an environment to practice writing KQL statements. The only requirement is to have an account to log into Azure. There are no charges to your Azure account to access this environment. You can execute the KQL statements in this module in the demo environment.
16+
Microsoft provides access to an environment to practice writing KQL statements. The only requirement is to have an account to log into Azure. There are no charges to your Azure account to access this environment. You can execute the KQL statements in this module in the demo environment.
1717

18-
You can access the demo environment at the [Logs Demo site](https://aka.ms/lademo). If you receive the message "No results found", try changing the time range.
18+
You can access the demo environment at the [Logs Demo site](https://aka.ms/lademo). If you receive the message *No results found*, try increasing the time range (or timeOffset) to > 30 days.
1919

2020
> [!IMPORTANT]
21-
> The log analytics demo database is a dynamic environment. The events recorded in the tables in that environment are continuously updating with different security events. This is similar to what a person would experience in a real-world security operations setting. As a result, finite queries in this training may show no results depending on the state of the demo database at the time the query is run. For example, a query on the *SecurityEvent* table for "discardEventID = 4688" within the last day may show no results if that particular event last took place three days ago. Therefore, you may need to adjust variables in the scripts listed in this training ad hoc depending on what data is in the demo database at the time you run the script in order for the query to show results. These script adjustments are similar to what you would perform in the real world and should help you learn how the specific parts of the script function.
21+
> The log analytics demo database is a dynamic environment. The events recorded in the tables in that environment are continuously updating with different security events. This is similar to what a person would experience in a real-world security operations setting. As a result, finite queries in this training may show no results depending on the state of the demo database at the time the query is run. For example, a query on the *SecurityEvent* table for "discardEventID = 4688" within the last day may show no results if that particular event last took place three days ago. Therefore, you may need to adjust variables in the scripts listed in this training depending on what data is in the demo database at the time you run the script in order for the query to show results. These script adjustments are similar to what you would perform in the real world and should help you learn how the specific parts of the script function.
2222
2323
:::image type="content" source="../media/log-analytics-demo-2.png" alt-text="Screenshot of the Log Analytics Demo Environment.":::
2424

learn-pr/wwl-sci/construct-kusto-query-language-statements/includes/5-use-let-statement.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
Let statements bind names to expressions. For the rest of the scope, where the let statement appear, the name refers to its bound value. Let statements improve modularity and reuse since they allow you to break a potentially complex expression into multiple parts. Each part is bound to a name through the let statement, and together they compose the whole. Let statements allow for the creation of user-defined functions and views. The views are expressions whose results look like a new table.
1+
Let statements bind names to expressions. For the rest of the scope, where the let statement appear, the name refers to its bound value. Let statements improve modularity and reuse since they allow you to break a potentially complex expression into multiple parts. Each part is bound to a name through the let statement, and together they compose the whole. Let statements allow for the creation of user-defined functions and views. The views are expressions whose results look like a new table.
22

33
## Declare and reuse variables
44

5-
Let statements allow for the creation of variables to be used in later statements. In this example, timeOffSet and discardEventId are created and used as part of the SecurityEvent "where" clause.
5+
Let statements allow for the creation of variables to be used in later statements. In this example, timeOffSet and discardEventId are created and used as part of the SecurityEvent "where" clause.
6+
7+
> [!NOTE]
8+
> You may need to increase the timeOffset and time ranges to see results in the [Logs Demo site](https://aka.ms/lademo) environment. We suggest using > 30 days if you don't see results.
69
710
```kusto
811
let timeOffset = 7d;
@@ -14,7 +17,7 @@ SecurityEvent
1417
```
1518

1619
> [!TIP]
17-
> "ago()" is a function that will take the current Date and Time and subtract the value provided.
20+
> "ago()" is a function that takes the current Date and Time and subtract the value provided.
1821
1922
## Declare dynamic tables or lists
2023

@@ -35,4 +38,3 @@ let LowActivityAccounts =
3538
| where cnt < 1000;
3639
LowActivityAccounts | where Account contains "SQL"
3740
```
38-

learn-pr/wwl-sci/construct-kusto-query-language-statements/index.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ uid: learn.wwl.construct-kql-statements
33
metadata:
44
title: Construct KQL statements for Microsoft Sentinel
55
description: "Construct KQL statements for Microsoft Sentinel"
6-
ms.date: 09/20/2024
7-
author: wwlpublish
6+
ms.date: 05/02/2025
7+
author: KenMAG
88
ms.author: kelawson
99
ms.topic: module
1010
ms.service: microsoft-sentinel
1111
title: Construct KQL statements for Microsoft Sentinel
12-
summary: Kusto Query Language (KQL) is the query language used to perform analysis on data to create analytics, workbooks, and perform hunting in Microsoft Sentinel. Learn how basic KQL statement structure provides the foundation to build more complex statements.
12+
summary: Kusto Query Language (KQL) is the query language used to perform analysis on data to create analytics, workbooks, and perform hunting in Microsoft Sentinel. Learn how basic KQL statement structure provides the foundation to build more complex statements.
1313
abstract: |
1414
Upon completion of this module, the learner is able to:
1515
- Construct KQL statements

0 commit comments

Comments
 (0)