From d25cac35825d25c5e34c6be0d661c7279edd0cd2 Mon Sep 17 00:00:00 2001 From: Michael Brichko Date: Tue, 17 Mar 2026 18:50:10 +0200 Subject: [PATCH 1/7] initial --- .../query/graph-query-language-reference.md | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/data-explorer/kusto/query/graph-query-language-reference.md b/data-explorer/kusto/query/graph-query-language-reference.md index 9f256d6621..8de74330ae 100644 --- a/data-explorer/kusto/query/graph-query-language-reference.md +++ b/data-explorer/kusto/query/graph-query-language-reference.md @@ -260,6 +260,32 @@ MATCH WALK (n)-[]->(a), TRAIL (n)-[]->(b) RETURN n, a, b ``` +### Shortest path + +Finds the shortest paths between a set of source nodes and a set of target nodes. + +### Single shortest path + +Calculates single shortest path per source/target pair. + +```gql +MATCH P = ANY SHORTEST (n)-[]->(a) +RETURN P +``` + +### All shortest paths + +Calculates all shortest paths of equal minimum length. + +```gql +MATCH P = ALL SHORTEST (n)-[]->(a) +RETURN P +``` + +#### Limitations: + +* Shortest path match clause can't contain multiple pattern sequences + ## Functions and operators reference Graph Query Language (GQL) provides a rich set of functions and operators to work with graph patterns, nodes, edges, and properties. @@ -352,7 +378,7 @@ RETURN COUNT(*) > 0 AS HasSuspiciousActivity ### Limitations -- **Query structure**: All openCypher queries must start with a `MATCH` statement. +- **Query structure**: All GQL queries must start with a `MATCH` statement. - **Reserved keywords**: Some GQL keywords can't be used as identifiers in queries. Some reserved keywords aren't immediately obvious (for example, `DATE` is a reserved keyword). If your graph data has property names that conflict with GQL reserved keywords, use different property names in your graph schema or rename them to avoid parsing conflicts. From 54ede1b9e0cc895530db4276480f796b7a65f6a9 Mon Sep 17 00:00:00 2001 From: Michael Brichko Date: Thu, 19 Mar 2026 12:40:03 +0200 Subject: [PATCH 2/7] add sample conditions --- data-explorer/kusto/query/graph-query-language-reference.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data-explorer/kusto/query/graph-query-language-reference.md b/data-explorer/kusto/query/graph-query-language-reference.md index 8de74330ae..5505db9b42 100644 --- a/data-explorer/kusto/query/graph-query-language-reference.md +++ b/data-explorer/kusto/query/graph-query-language-reference.md @@ -269,7 +269,7 @@ Finds the shortest paths between a set of source nodes and a set of target nodes Calculates single shortest path per source/target pair. ```gql -MATCH P = ANY SHORTEST (n)-[]->(a) +MATCH P = ANY SHORTEST (n {station:"South-West"})-[]->{1,3}(a {station: "North"}) RETURN P ``` @@ -278,7 +278,7 @@ RETURN P Calculates all shortest paths of equal minimum length. ```gql -MATCH P = ALL SHORTEST (n)-[]->(a) +MATCH P = ALL SHORTEST (n {station:"South-West"})-[]->{1,3}(a {station: "North"}) RETURN P ``` From 3a825f5515a21b697caa9390d999007f92a182b9 Mon Sep 17 00:00:00 2001 From: Carmel Lederer <16527376+MrLederer@users.noreply.github.com> Date: Sun, 3 May 2026 14:59:24 +0300 Subject: [PATCH 3/7] Update retention policy documentation for clarity Clarified the behavior of recoverability settings at the database level and updated examples for retention policies. --- data-explorer/kusto/management/retention-policy.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/data-explorer/kusto/management/retention-policy.md b/data-explorer/kusto/management/retention-policy.md index 7747facc5a..42cb6213e9 100644 --- a/data-explorer/kusto/management/retention-policy.md +++ b/data-explorer/kusto/management/retention-policy.md @@ -42,6 +42,9 @@ A retention policy includes the following properties: * Defaults to `Enabled`. * If set to `Enabled`, data deleted **due to retention policy** will be recoverable for 14 days after it's been soft-deleted. * It is not possible to configure the recoverability period. + * Recoverability is enforced at the database level: + * If recoverability is enabled on any table or materialized view, it becomes enabled for the entire database. + * Recoverability can be effectively disabled only when it is disabled on all tables and materialized views, regardless of whether the setting is direct or inherited from the database. > [!NOTE] > @@ -127,6 +130,10 @@ Set all tables in the database to have a soft-delete period of seven days and di .alter-merge table MyTable2 policy retention softdelete = 7d recoverability = disabled .alter-merge table MySpecialTable policy retention softdelete = 14d recoverability = enabled ``` + +> [!NOTE] +> +> Even though only `MySpecialTable` has recoverability enabled, recoverability will be enabled for the entire database. ### Soft-delete period of seven days, and `MySpecialTable` keeps its data indefinitely From 16c9fcd1de906931a437736d6d8daa5af1e91b2f Mon Sep 17 00:00:00 2001 From: Carmel Lederer <16527376+MrLederer@users.noreply.github.com> Date: Tue, 5 May 2026 12:58:42 +0300 Subject: [PATCH 4/7] Update retention policy documentation for recoverability Integrated Natis comment to sound less obligated to this behavior --- data-explorer/kusto/management/retention-policy.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/data-explorer/kusto/management/retention-policy.md b/data-explorer/kusto/management/retention-policy.md index 42cb6213e9..1e2e934250 100644 --- a/data-explorer/kusto/management/retention-policy.md +++ b/data-explorer/kusto/management/retention-policy.md @@ -42,9 +42,10 @@ A retention policy includes the following properties: * Defaults to `Enabled`. * If set to `Enabled`, data deleted **due to retention policy** will be recoverable for 14 days after it's been soft-deleted. * It is not possible to configure the recoverability period. - * Recoverability is enforced at the database level: - * If recoverability is enabled on any table or materialized view, it becomes enabled for the entire database. - * Recoverability can be effectively disabled only when it is disabled on all tables and materialized views, regardless of whether the setting is direct or inherited from the database. + * Recoverability is managed at the database level. + * Enabling it on a table or materialized view can propagate recoverability to the entire database and will typically result in database-wide data recoverability. + * To fully disable recoverability, it should be disabled across all tables and materialized views + > [!NOTE] > @@ -133,7 +134,7 @@ Set all tables in the database to have a soft-delete period of seven days and di > [!NOTE] > -> Even though only `MySpecialTable` has recoverability enabled, recoverability will be enabled for the entire database. +> Even though only `MySpecialTable` has recoverability enabled, the system will typically enable recoverability for the entire database as a result. ### Soft-delete period of seven days, and `MySpecialTable` keeps its data indefinitely From 62d71ac7d2a79f2aa3155673dd784f33701a0a18 Mon Sep 17 00:00:00 2001 From: Carmel Lederer <16527376+MrLederer@users.noreply.github.com> Date: Tue, 5 May 2026 17:13:53 +0300 Subject: [PATCH 5/7] Clarify recoverability management in retention policy refactors --- data-explorer/kusto/management/retention-policy.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/data-explorer/kusto/management/retention-policy.md b/data-explorer/kusto/management/retention-policy.md index 1e2e934250..b042964549 100644 --- a/data-explorer/kusto/management/retention-policy.md +++ b/data-explorer/kusto/management/retention-policy.md @@ -42,9 +42,7 @@ A retention policy includes the following properties: * Defaults to `Enabled`. * If set to `Enabled`, data deleted **due to retention policy** will be recoverable for 14 days after it's been soft-deleted. * It is not possible to configure the recoverability period. - * Recoverability is managed at the database level. - * Enabling it on a table or materialized view can propagate recoverability to the entire database and will typically result in database-wide data recoverability. - * To fully disable recoverability, it should be disabled across all tables and materialized views + * Recoverability is managed at the database level - enabling it on a single table or materialized view will typically propagate the behavior to the entire database. > [!NOTE] @@ -134,7 +132,7 @@ Set all tables in the database to have a soft-delete period of seven days and di > [!NOTE] > -> Even though only `MySpecialTable` has recoverability enabled, the system will typically enable recoverability for the entire database as a result. +> Even though only `MySpecialTable` has recoverability enabled, recoverability will effectively be enabled for the entire database ### Soft-delete period of seven days, and `MySpecialTable` keeps its data indefinitely From bf9e93dda7143b12af6ea6a6883ccda0d3c40fc7 Mon Sep 17 00:00:00 2001 From: Carmel Lederer <16527376+MrLederer@users.noreply.github.com> Date: Tue, 5 May 2026 17:15:36 +0300 Subject: [PATCH 6/7] Clarify recoverability settings in retention policy Removed redundant line about recoverability settings. --- data-explorer/kusto/management/retention-policy.md | 1 - 1 file changed, 1 deletion(-) diff --git a/data-explorer/kusto/management/retention-policy.md b/data-explorer/kusto/management/retention-policy.md index b042964549..252e371a20 100644 --- a/data-explorer/kusto/management/retention-policy.md +++ b/data-explorer/kusto/management/retention-policy.md @@ -44,7 +44,6 @@ A retention policy includes the following properties: * It is not possible to configure the recoverability period. * Recoverability is managed at the database level - enabling it on a single table or materialized view will typically propagate the behavior to the entire database. - > [!NOTE] > > Data that is deleted using [soft delete](../concepts/data-soft-delete.md) or [purge](../concepts/data-purge.md) is not recoverable regardless of any retention or recoverability settings. From 1d668322aace783f14d90511d677c55ca6b5c21c Mon Sep 17 00:00:00 2001 From: Carmel Lederer <16527376+MrLederer@users.noreply.github.com> Date: Tue, 5 May 2026 17:26:25 +0300 Subject: [PATCH 7/7] Update retention policy details in documentation Clarified retention policy for MyTable1, MyTable2, and MySpecialTable. --- data-explorer/kusto/management/retention-policy.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/data-explorer/kusto/management/retention-policy.md b/data-explorer/kusto/management/retention-policy.md index 252e371a20..8f3f79e4b3 100644 --- a/data-explorer/kusto/management/retention-policy.md +++ b/data-explorer/kusto/management/retention-policy.md @@ -128,10 +128,6 @@ Set all tables in the database to have a soft-delete period of seven days and di .alter-merge table MyTable2 policy retention softdelete = 7d recoverability = disabled .alter-merge table MySpecialTable policy retention softdelete = 14d recoverability = enabled ``` - -> [!NOTE] -> -> Even though only `MySpecialTable` has recoverability enabled, recoverability will effectively be enabled for the entire database ### Soft-delete period of seven days, and `MySpecialTable` keeps its data indefinitely