Skip to content

Commit d835947

Browse files
Merge pull request #2532 from MicrosoftDocs/main638741811564092865sync_temp
For protected branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents 7548102 + 295d64e commit d835947

File tree

9 files changed

+562
-1
lines changed

9 files changed

+562
-1
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
title: .alter entity_group command
3+
description: Learn how to use the `.alter entity_group` command to change an existing entity group.
4+
ms.reviewer: ziham1531991
5+
ms.topic: reference
6+
ms.date: 01/26/2025
7+
---
8+
9+
10+
# .alter entity_group command
11+
12+
> [!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)]
13+
14+
Alters an existing entity group and stores it inside the database metadata. For more information, see [Entity groups](entity-groups.md).
15+
16+
## Permissions
17+
18+
You must have at least [Database Admin](../access-control/role-based-access-control.md) permissions to run this command.
19+
20+
## Syntax
21+
22+
`.alter` `entity_group` [`ifnotexists`] *EntityGroupName* `(`*EntityReference* [`,` ...]`)`
23+
24+
[!INCLUDE [syntax-conventions-note](../includes/syntax-conventions-note.md)]
25+
26+
## Parameters
27+
28+
|Name|Type|Required|Description|
29+
|--|--|--|--|
30+
| `ifnotexists` | `string` | | If specified, the entity group is only created if the entity group doesn't exist yet.|
31+
|*EntityGroupName*| `string` | :heavy_check_mark:|The name of the entity group. |
32+
|*EntityReference*| `string` | :heavy_check_mark:|An entity included in the entity group. |
33+
34+
## Returns
35+
36+
This command returns a table with the following columns:
37+
38+
|Output parameter |Type |Description|
39+
|---|---|---|
40+
|Name | `string` | The name of the entity group.|
41+
|Entities | `array` | An array which includes one or more entities. If the entity group doesn't exist, and the `ifnotexists` flag isn't specified, an error is returned.|
42+
43+
## Examples
44+
45+
The following example alters `MyEntityGroup` to include the entity, `cluster('c1').database('d1')`.
46+
47+
```kusto
48+
.alter entity_group MyEntityGroup (cluster('c1').database('d1'))
49+
```
50+
51+
**Output**
52+
53+
|Name|Entities|
54+
|---|---|
55+
|MyEntityGroup|["cluster('c1').database('d1')"]|
56+
57+
## Related content
58+
59+
* [Entity groups](entity-groups.md)
60+
* [Entity types](../query/schema-entities/index.md)
61+
* [.create entity_group command](create-entity-group.md)
62+
* [.alter-merge entity_group command](alter-merge-entity-group.md)
63+
* [.drop entity_group command](drop-entity-group.md)
64+
* [.show entity_group(s) command](show-entity-group.md)
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
title: .alter-merge entity_group command
3+
description: Learn how to use the `.alter-merge entity_group` command to change an existing entity group.
4+
ms.reviewer: ziham1531991
5+
ms.topic: reference
6+
ms.date: 01/26/2025
7+
---
8+
9+
# .alter-merge entity_group command
10+
11+
> [!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)]
12+
13+
Alters and merges an existing entity group with the provided list of entities and stores it inside the database metadata. For more information, see [Entity groups](entity-groups.md).
14+
15+
## Permissions
16+
17+
You must have at least [Database Admin](../access-control/role-based-access-control.md) permissions to run this command.
18+
19+
## Syntax
20+
21+
`.alter-merge` `entity_group` *EntityGroupName* `(`*EntityReference* [`,` ...]`)`
22+
23+
[!INCLUDE [syntax-conventions-note](../includes/syntax-conventions-note.md)]
24+
25+
## Parameters
26+
27+
|Name|Type|Required|Description|
28+
|--|--|--|--|
29+
|*EntityGroupName*| `string` | :heavy_check_mark:|The name of the entity group. |
30+
|*EntityReference*| `string` | :heavy_check_mark:|An entity included in the entity group. |
31+
32+
## Returns
33+
34+
This command returns a table with the following columns:
35+
36+
|Output parameter |Type |Description|
37+
|---|---|---|
38+
|Name | `string` | The name of the entity group.|
39+
|Entities | `array` | An array which includes one or more entities.|
40+
41+
## Examples
42+
43+
The following example edits the `MyEntityGroup` entity group and adds the entity `cluster('c2').database('d2')` to the entity group.
44+
45+
First run the following command to create a new entity group with entity `cluster('c1').database('d1')`:
46+
47+
```kusto
48+
.create entity_group MyEntityGroup (cluster('c1').database('d1'))
49+
```
50+
51+
**Output**
52+
53+
|Name|Entities|
54+
|---|---|
55+
|MyEntityGroup|["cluster('c1').database('d1')"]|
56+
57+
Then run the following command to edit the existing entity group `MyEntityGroup` and add the entity `cluster('c2').database('d2')`:
58+
59+
```kusto
60+
.alter-merge entity_group MyEntityGroup (cluster('c2').database('d2'))
61+
```
62+
63+
**Output**
64+
65+
|Name|Entities|
66+
|---|---|
67+
|MyEntityGroup|["cluster('c1').database('d1')","cluster('c2').database('d2')"]|
68+
69+
## Related content
70+
71+
* [Entity groups](entity-groups.md)
72+
* [Entity types](../query/schema-entities/index.md)
73+
* [.create entity_group command](create-entity-group.md)
74+
* [.alter entity_group command](alter-entity-group.md)
75+
* [.drop entity_group command](drop-entity-group.md)
76+
* [.show entity_group(s) command](show-entity-group.md)
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
title: .create entity_group command
3+
description: Learn how to use the `.create entity_group` command to create an entity group.
4+
ms.reviewer: ziham1531991
5+
ms.topic: reference
6+
ms.date: 01/27/2025
7+
---
8+
9+
# .create entity_group command
10+
11+
> [!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)]
12+
13+
Creates a stored entity group with a specific name, which functions like a reusable [`let` statement](../query/let-statement.md). The entity group definition is saved as part of the database metadata.
14+
15+
## Permissions
16+
17+
You must have at least [Database Admin](../access-control/role-based-access-control.md) permissions to run this command.
18+
19+
## Syntax
20+
21+
`.create` `entity_group` [`ifnotexists`] *EntityGroupName* `(`[*EntityReference*`,` ...]`)`
22+
23+
[!INCLUDE [syntax-conventions-note](../includes/syntax-conventions-note.md)]
24+
25+
## Parameters
26+
27+
|Name|Type|Required|Description|
28+
|--|--|--|--|
29+
| `ifnotexists` | `string` | | If specified, the entity group is only created if the entity group doesn't exist yet.|
30+
|*EntityGroupName*| `string` | :heavy_check_mark:|The name of the entity group. |
31+
|*EntityReference*| `string` | :heavy_check_mark:|An entity included in the entity group. |
32+
33+
## Returns
34+
35+
This command returns a table with the following columns:
36+
37+
|Output parameter |Type |Description|
38+
|---|---|---|
39+
|Name | `string` | The name of the entity group.|
40+
|Entities | `array` | An array which includes one or more entities. If the entity group already exists, and the `ifnotexists` flag is specified, the command is ignored. Otherwise, an error is returned.|
41+
42+
## Examples
43+
44+
The following example creates the `MyEntityGroup` entity group with two entities, `cluster('c1').database('d1')` and `cluster('c2').database('d2')`.
45+
46+
```kusto
47+
.create entity_group MyEntityGroup (cluster('c1').database('d1'), cluster('c2').database('d2'))
48+
```
49+
50+
|Name|Entities|
51+
|---|---|
52+
|MyEntityGroup|["cluster('c1').database('d1')","cluster('c2').database('d2')"]|
53+
54+
## Related content
55+
56+
* [Entity groups](entity-groups.md)
57+
* [Entity types](../query/schema-entities/index.md)
58+
* [.alter entity_group command](alter-entity-group.md)
59+
* [.alter-merge entity_group command](alter-merge-entity-group.md)
60+
* [.drop entity_group command](drop-entity-group.md)
61+
* [.show entity_group(s) command](show-entity-group.md)
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: .drop entity_group command
3+
description: Learn how to use the `.drop entity_group` command to remove an entity group from your database.
4+
ms.reviewer: ziham1531991
5+
ms.topic: reference
6+
ms.date: 01/27/2025
7+
---
8+
9+
# .drop entity_group command
10+
11+
> [!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)]
12+
13+
Drops an entity group from a database.
14+
15+
## Permissions
16+
17+
You must have at least [Database Admin](../access-control/role-based-access-control.md) permissions to run this command.
18+
19+
## Syntax
20+
21+
`.drop` `entity_group` *EntityGroupName*
22+
23+
[!INCLUDE [syntax-conventions-note](../includes/syntax-conventions-note.md)]
24+
25+
## Parameters
26+
27+
|Name|Type|Required|Description|
28+
|--|--|--|--|
29+
|*EntityGroupName*| `string` | |The name of the specific entity group you want to drop. |
30+
31+
## Returns
32+
33+
This command returns a list of the remaining tables in the database.
34+
35+
|Output parameter |Type |Description|
36+
|---|---|---|
37+
|Name | `string` | The name of the entity group.|
38+
|Entities | `array` | An array with one or more entities.|
39+
40+
## Examples
41+
42+
The following example drops the `MyEntityGroup` from your selected database.
43+
44+
```kusto
45+
.drop entity_group MyEntityGroup
46+
```
47+
48+
## Related content
49+
50+
* [Entity groups](entity-groups.md)
51+
* [Entity types](../query/schema-entities/index.md)
52+
* [.create entity_group command](create-entity-group.md)
53+
* [.alter entity_group command](alter-entity-group.md)
54+
* [.alter-merge entity_group command](alter-merge-entity-group.md)
55+
* [.show entity_group(s) command](show-entity-group.md)
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: Entity groups
3+
description: Learn how to use Entity groups to store entity groups in the database.
4+
ms.reviewer: ziham1531991
5+
ms.topic: reference
6+
ms.date: 01/26/2025
7+
---
8+
9+
# Entity groups
10+
11+
> [!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)]
12+
13+
Entity groups are named entities stored in a database that the [macro-expand query operator](../query/macro-expand-operator.md) can reference.
14+
15+
16+
Storing an entity group in the database, instead of providing its value in the query text itself, makes it easier to manage these objects.
17+
18+
## Management commands
19+
20+
|Function |Description|
21+
|---------|-----------|
22+
|[.alter entity_group](alter-entity-group.md) |Alters an existing entity group and stores it inside the database metadata. |
23+
|[.alter-merge entity_group](alter-merge-entity-group.md) |Alters and merges the value of an existing entity group. |
24+
|[.create entity_group](create-entity-group.md) |Creates a stored entity group.|
25+
|[.drop entity_group](drop-entity-group.md) |Drops an entity group from the database. |
26+
|[.show entity_group(s)](show-entity-group.md) |Lists all the stored entity groups, or a specific entity group, in the current database.|
27+
28+
> [!NOTE]
29+
> A query can only reference entity groups defined in the query text or in the scoped database. Out-of-scope entity groups that aren't within the query or database can’t be directly or indirectly referenced.
30+
31+
## Related content
32+
33+
* [macro-expand operator](../query/macro-expand-operator.md)
34+
* [Entity types](../query/schema-entities/index.md)
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
title: .show entity_group(s) command
3+
description: Learn how to use the `.show entity_group` command to view existing entity groups.
4+
ms.reviewer: ziham1531991
5+
ms.topic: reference
6+
ms.date: 01/27/2025
7+
---
8+
9+
# .show entity_group(s) command
10+
11+
> [!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)]
12+
13+
Lists all the [entity groups](entity-groups.md) in the selected database or lists the details of one specific stored entity group.
14+
15+
## Permissions
16+
17+
You must have at least [Database Admin](../access-control/role-based-access-control.md) permissions to run this command.
18+
19+
## Syntax
20+
21+
`.show` `entity_groups`
22+
23+
`.show` `entity_group` *EntityGroupName*
24+
25+
[!INCLUDE [syntax-conventions-note](../includes/syntax-conventions-note.md)]
26+
27+
## Parameters
28+
29+
|Name|Type|Required|Description|
30+
|--|--|--|--|
31+
|*EntityGroupName*| `string` | |The name of the specific entity group you wish to view. |
32+
33+
## Returns
34+
35+
This command returns a table with the following columns:
36+
37+
|Output parameter |Type |Description|
38+
|---|---|---|
39+
|Name | `string` | The name of the entity group.|
40+
|Entities | `array` | An array which includes one or more entities. If the entity group doesn't exist, an error is returned.|
41+
42+
## Examples
43+
44+
The following examples show how to use the `.show entity_group` and `.show entity_group` commands.
45+
46+
### Show entity groups
47+
48+
The following example returns all the entity groups in the selected database, `eg1` and `eg2`, along with their entities.
49+
50+
```kusto
51+
.show entity_groups
52+
```
53+
54+
**Output**
55+
56+
|Name|Entities|
57+
|---|---|
58+
|eg1|["cluster('c1').database('d1')"]|
59+
|eg2|["cluster('c2').database('d2')"]|
60+
61+
### Show an entity group
62+
63+
The following example returns the entity group, `eg1` along with its entity, `cluster('c1').database('d1')`.
64+
65+
```kusto
66+
.show entity_group eg1
67+
```
68+
69+
**Output**
70+
71+
|Name|Entities|
72+
|---|---|
73+
|eg1|["cluster('c1').database('d1')"]|
74+
75+
## Related content
76+
77+
* [Entity groups](entity-groups.md)
78+
* [Entity types](../query/schema-entities/index.md)
79+
* [.alter entity_group command](alter-entity-group.md)
80+
* [.alter-merge entity_group command](alter-merge-entity-group.md)
81+
* [.create entity_group command](create-entity-group.md)
82+
* [.drop entity_group command](drop-entity-group.md)

0 commit comments

Comments
 (0)