Skip to content

Commit 3c888da

Browse files
Learn Build Service GitHub AppLearn Build Service GitHub App
authored andcommitted
Merging changes synced from https://github.com/MicrosoftDocs/dataexplorer-docs-pr (branch live)
2 parents 0be0f1d + 18ebcef commit 3c888da

32 files changed

+231
-75
lines changed

.github/pull_request_template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ Please add a brief comment outlining the purpose of this PR. Add links to any re
44

55
## Make sure you've done the following:
66

7-
1. **Acrolinx:** Make sure your Acrolinx score is **at least 80** (higher is better) and with **0** spelling issues.
7+
1. **Acrolinx**: Make sure your Acrolinx score is **at least 80** (higher is better) and with **0** spelling issues.
88
1. **Successful build**: Review the build status to make sure **all files are green** (Succeeded) and there are no errors, warnings, or suggestions.
99
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're adding a new markdown file, make sure it is linked from the table of contents.
10+
1. **Check the Table of Contents**: If you're adding a new markdown file, make sure it is linked from the table of contents.
1111
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`.
1212

1313
**NOTE**: *Signing off means the document can be published at any time.*

data-explorer/kusto/includes/help-cluster-samples-stormevents.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

data-explorer/kusto/management/create-function.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: .create function command
33
description: Learn how to use the `.create function` command to create a stored function.
44
ms.reviewer: orspodek
55
ms.topic: reference
6-
ms.date: 08/11/2024
6+
ms.date: 12/19/2024
77
---
88
# .create function command
99

@@ -71,7 +71,7 @@ You must have at least [Database User](../access-control/role-based-access-contr
7171
7272
## Examples
7373

74-
### Simple demo function
74+
### Simple function
7575

7676
The following example creates the `MyFunction1` function with a description (`docstring`), a folder named `Demo`, and defines the function.
7777

@@ -86,17 +86,18 @@ MyFunction1()
8686
|---|---|---|---|---|
8787
|MyFunction1|()|{StormEvents | take 100}|Demo|Simple demo function|
8888

89-
### Demo function with parameter
89+
### Function with a parameter
9090

91-
The following example creates the *MyFunction2* function with a description (`docstring`), folder named `Demo`, and defines the `MyLimit` parameter.
91+
The following example creates the `MyFunction2` function with a description (`docstring`), folder named `Demo`, and defines the `Mytimestamp` parameter.
9292

9393
```kusto
94-
.create function
95-
with (docstring = 'Demo function with parameter', folder='Demo')
96-
MyFunction2(myLimit: long)
97-
{StormEvents | take myLimit}
94+
.create function with (docstring = "Demo function with date parameter",folder = "Demo")
95+
MyFunction2(Mytimestamp:datetime) {
96+
StormEvents
97+
| where EndTime <= Mytimestamp
98+
}
9899
```
99100

100101
|Name|Parameters|Body|Folder|DocString|
101102
|---|---|---|---|---|
102-
|MyFunction2|(myLimit:long)|{StormEvents &#124; take myLimit}|Demo|Demo function with parameter|
103+
|MyFunction2|(Mytimestamp:datetime)|{StormEvents &#124; where EndTime <= Mytimestamp}|Demo|Demo function with date parameter|

data-explorer/kusto/management/data-export/show-continuous-failures.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.date: 12/08/2024
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)]
1111
12-
Returns all failures logged as part of the continuous export. To view only a specific time range, filter the results by the **Timestamp** column.
12+
Returns all failures logged as part of the continuous export within the past 14 days. To view only a specific time range, filter the results by the **Timestamp** column.
1313

1414
::: moniker range="azure-data-explorer"
1515
The command doesn't return any results if executed on a [follower database](/azure/data-explorer/follower), it must be executed against the leader database.

data-explorer/kusto/management/mappings.md

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Ingestion mappings are used during ingestion to map incoming data to columns ins
1414

1515
Data Explorer supports different types of mappings, both row-oriented (CSV, JSON, AVRO and W3CLOGFILE), and column-oriented (Parquet and ORC).
1616

17-
Ingestion mappings can be [precreated](create-ingestion-mapping-command.md) and can be referenced from the ingest command using `ingestionMappingReference` parameters. Ingestion is possible without specifying a mapping. For more information, see [identity mapping](#identity-mapping).
17+
Ingestion mappings can be defined in the ingest command, or can be [precreated](create-ingestion-mapping-command.md) and referenced from the ingest command using `ingestionMappingReference` parameters. Ingestion is possible without specifying a mapping. For more information, see [identity mapping](#identity-mapping).
1818

1919
Each element in the mapping list is constructed from three fields:
2020

@@ -47,6 +47,63 @@ The following table defines mapping types to be used when ingesting or querying
4747
| ORC | [ORC Mapping](orc-mapping.md) |
4848
| W3CLOGFILE | [W3CLOGFILE Mapping](w3c-log-file-mapping.md) |
4949

50+
51+
## Ingestion mapping examples
52+
53+
The following examples use the `RawEvents` table with the following schema:
54+
55+
```kusto
56+
.create table RawEvents (timestamp: datetime, deviceId: guid, messageId: guid, temperature: decimal, humidity: decimal)
57+
```
58+
59+
### Simple mapping
60+
61+
The following example shows ingestion where the mapping is defined in the ingest command. The command ingests a JSON file from a URL into the `RawEvents` table. The mapping specifies the path to each field in the JSON file.
62+
63+
````kusto
64+
.ingest into table RawEvents ('https://kustosamplefiles.blob.core.windows.net/jsonsamplefiles/simple.json')
65+
with (
66+
format = "json",
67+
ingestionMapping =
68+
```
69+
[
70+
{"column":"timestamp","Properties":{"path":"$.timestamp"}},
71+
{"column":"deviceId","Properties":{"path":"$.deviceId"}},
72+
{"column":"messageId","Properties":{"path":"$.messageId"}},
73+
{"column":"temperature","Properties":{"path":"$.temperature"}},
74+
{"column":"humidity","Properties":{"path":"$.humidity"}}
75+
]
76+
```
77+
)
78+
````
79+
80+
### Mapping with `ingestionMappingReference`
81+
82+
To map the same JSON file using a precreated mapping, create the `RawEventMapping` ingestion mapping reference with the following command:
83+
84+
````kusto
85+
.create table RawEvents ingestion json mapping 'RawEventMapping'
86+
```
87+
[
88+
{"column":"timestamp","Properties":{"path":"$.timestamp"}},
89+
{"column":"deviceId","Properties":{"path":"$.deviceId"}},
90+
{"column":"messageId","Properties":{"path":"$.messageId"}},
91+
{"column":"temperature","Properties":{"path":"$.temperature"}},
92+
{"column":"humidity","Properties":{"path":"$.humidity"}}
93+
]
94+
```
95+
````
96+
97+
Ingest the JSON file using the `RawEventMapping` ingestion mapping reference with the following command:
98+
99+
```kusto
100+
.ingest into table RawEvents ('https://kustosamplefiles.blob.core.windows.net/jsonsamplefiles/simple.json')
101+
with (
102+
format="json",
103+
ingestionMappingReference="RawEventMapping"
104+
)
105+
```
106+
50107
## Identity mapping
51108

52109
Ingestion is possible without specifying `ingestionMapping` or `ingestionMappingReference` properties. The data is mapped using an identity data mapping derived from the table's schema. The table schema remains the same. `format` property should be specified. See [ingestion formats](../ingestion-supported-formats.md).

data-explorer/kusto/management/request-rate-limit-policy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ A request rate limit of kind `ResourceUtilization` includes the following proper
6565
|--|--|--|--|
6666
| ResourceKind | `ResourceKind` | The resource to limit.</br></br>When `ResourceKind` is `TotalCpuSeconds`, the limit is enforced based on post-execution reports of CPU utilization of completed requests. Requests that report utilization of 0.005 seconds of CPU or lower aren't counted. The limit (`MaxUtilization`) represents the total CPU seconds that can be consumed by requests within a specified time window (`TimeWindow`). For example, a user running ad-hoc queries may have a limit of 1000 CPU seconds per hour. If this limit is exceeded, subsequent queries will be throttled, even if started concurrently, as the cumulative CPU seconds have surpassed the defined limit within the sliding window period. | `RequestCount`, `TotalCpuSeconds` |
6767
| MaxUtilization | `long` | The maximum of the resource that can be utilized. | RequestCount: [`1`, `16777215`]; TotalCpuSeconds: [`1`, `828000`] |
68-
| TimeWindow | `timespan` | The sliding time window during which the limit is applied. | [`00:01:00`, `1.00:00:00`] |
68+
| TimeWindow | `timespan` | The sliding time window during which the limit is applied. | [`00:00:01`, `01:00:00`] |
6969

7070
When a request exceeds the limit on resources utilization:
7171

data-explorer/kusto/query/graph-match-operator.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ The `graph-match` operator searches for all occurrences of a graph pattern in an
1616
1717
## Syntax
1818

19-
*G* `|` `graph-match` [`cycles` `=` *CyclesOption*] *Pattern* `where` *Constraints* `project` [*ColumnName* `=`] *Expression* [`,` ...]
19+
*G* `|` `graph-match` [`cycles` `=` *CyclesOption*] *Pattern* [`where` *Constraints*] `project` [*ColumnName* `=`] *Expression* [`,` ...]
2020

2121
## Parameters
2222

2323
| Name | Type | Required | Description |
2424
|--|--|--|--|
2525
| *G* | `string` | :heavy_check_mark: | The input graph source. |
2626
| *Pattern* | `string` | :heavy_check_mark: | One or more comma delimited sequences of graph node elements connected by graph edge elements using graph notations. See [Graph pattern notation](#graph-pattern-notation). |
27-
| *Constraints* | `string` | :heavy_check_mark: | A Boolean expression composed of properties of named variables in the *Pattern*. Each graph element (node/edge) has a set of properties that were attached to it during the graph construction. The constraints define which elements (nodes and edges) are matched by the pattern. A property is referenced by the variable name followed by a dot (`.`) and the property name. |
28-
| *Expression* | `string` | | The `project` clause converts each pattern to a row in a tabular result. The project expression(s) have to be scalar and reference properties of named variables defined in the *Pattern*. A property is referenced by the variable name followed by a dot (`.`) and the attribute name. |
27+
| *Constraints* | `string` | | A Boolean expression composed of properties of named variables in the *Pattern*. Each graph element (node/edge) has a set of properties that were attached to it during the graph construction. The constraints define which elements (nodes and edges) are matched by the pattern. A property is referenced by the variable name followed by a dot (`.`) and the property name. |
28+
| *Expression* | `string` | :heavy_check_mark: | The `project` clause converts each pattern to a row in a tabular result. The project expression(s) have to be scalar and reference properties of named variables defined in the *Pattern*. A property is referenced by the variable name followed by a dot (`.`) and the attribute name. |
2929
| *CyclesOption* | `string` | | Controls whether cycles are matched in the *Pattern*, allowed values: `all`, `none`, `unique_edges`. If `all` is specified then all cycles are matched, if `none` is specified cycles aren't matched, if `unique_edges` (default) is specified, cycles are matched but only if the cycles don't include the same edge more than once. |
3030

3131

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: invoke operator
33
description: Learn how to use the invoke operator to invoke a lambda expression that receives the source of `invoke` as a tabular parameter argument
44
ms.reviewer: alexans
55
ms.topic: reference
6-
ms.date: 08/11/2024
6+
ms.date: 01/15/2025
77
---
88
# invoke operator
99

@@ -34,7 +34,7 @@ Returns the result of the evaluated expression.
3434

3535
## Example
3636

37-
The following example shows how to use the `invoke` operator to call lambda `let` expression:
37+
This example shows how to use the `invoke` operator to call lambda `let` expression:
3838

3939
:::moniker range="azure-data-explorer"
4040
> [!div class="nextstepaction"]

data-explorer/kusto/query/join-cross-cluster.md

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Cross-cluster join
33
description: Learn how to perform the Cross-cluster join operation to join datasets residing on different clusters.
44
ms.reviewer: alexans
55
ms.topic: reference
6-
ms.date: 08/11/2024
6+
ms.date: 01/26/2025
77
monikerRange: "microsoft-fabric || azure-data-explorer"
88
---
99
# Cross-cluster join
@@ -57,40 +57,31 @@ The following list explains the supported values for the *Strategy* parameter:
5757
5858
## How the auto strategy works
5959

60-
By default, the `auto` strategy determines where the cross-cluster join should be executed based on the following rules:
60+
By default, the `auto` strategy determines where the cross-cluster join is executed based on the following rules:
6161

62-
* If one of the tables is hosted in the local cluster, then the join is performed on the local cluster.
63-
* If both tables are hosted outside of the local cluster, then join is performed on the right cluster.
62+
* If one of the tables is hosted in the local cluster, then the join is performed on the local cluster. For example, with the auto strategy, this query is executed on the local cluster:
6463

65-
Consider the following examples:
64+
```kusto
65+
T | ... | join (cluster("B").database("DB").T2 | ...) on Col1
66+
```
6667
67-
```kusto
68-
// Example 1
69-
T | ... | join (cluster("B").database("DB").T2 | ...) on Col1
70-
71-
// Example 2
72-
cluster("B").database("DB").T | ... | join (cluster("C").database("DB2").T2 | ...) on Col1
73-
```
68+
* If both tables are hosted outside of the local cluster, then join is performed on the right cluster. For example, assuming neither cluster is the local cluster, the join would be executed on the right cluster:
7469
75-
With the `auto` strategy, "Example 1" would be executed on the local cluster. In "Example 2", assuming neither cluster is the local cluster, the join would be executed on the right cluster.
70+
```kusto
71+
cluster("B").database("DB").T | ... | join (cluster("C").database("DB2").T2 | ...) on Col1
72+
```
7673
7774
## Performance considerations
7875
7976
For optimal performance, we recommend running the query on the cluster that contains the largest table.
8077
81-
Let's consider the following examples again:
78+
In the following example, if the dataset produced by `T | ...` is smaller than one produced by `cluster("B").database("DB").T2 | ...` then it would be more efficient to execute the join operation on cluster `B`, in this case the right cluster instead of on the local cluster.
8279
8380
```kusto
84-
// Example 1
8581
T | ... | join (cluster("B").database("DB").T2 | ...) on Col1
86-
87-
// Example 2
88-
cluster("B").database("DB").T | ... | join (cluster("C").database("DB2").T2 | ...) on Col1
8982
```
9083

91-
"Example 1" is set to run on the local cluster, but if the dataset produced by `T | ...` is smaller than one produced by `cluster("B").database("DB").T2 | ...` then it would be more efficient to execute the join operation on cluster `B`, in this case the right cluster, instead of on the local cluster.
92-
93-
The following query does this by using the `right` strategy. With the `right` strategy, the join operation is performed on the right cluster, even if left table is in the local cluster.
84+
You can rewrite the query to use `hint.remote=right` to optimize the performance. In this way, the join operation is performed on the right cluster, even if left table is in the local cluster.
9485

9586
```kusto
9687
T | ... | join hint.remote=right (cluster("B").database("DB").T2 | ...) on Col1

data-explorer/kusto/query/join-fullouter.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ A `fullouter` join combines the effect of applying both left and right outer-joi
3131

3232
## Example
3333

34+
This example query combines rows from both tables X and Y, filling in missing values with NULL where there's no match in the other table. This allows you to see all possible combinations of keys from both tables.
35+
3436
:::moniker range="azure-data-explorer"
3537
> [!div class="nextstepaction"]
3638
> <a href="https://dataexplorer.azure.com/clusters/help/databases/Samples?query=H4sIAAAAAAAAA8tJLVGIULBVSEksAcKknFQN79RKq%2BKSosy8dB2FsMSc0lRDq5z8vHRNrmguBSBQT1TXMdSBMJPUdYwQTGMoM1ldx4Qr1porB2h0JH6jjVCNBhpiaIAwxQiJbQxjpwBNNwAZH6FQo5CVn5mnkJ2Zl2KbVpqTk19akloEtDI%2FTwFoEwDuw%2F%2BW2gAAAA%3D%3D" target="_blank">Run the query</a>

0 commit comments

Comments
 (0)