.create entity_group command

Applies to: ✅ Azure Data Explorer

Creates a stored entity group with a specific name, which functions like a reusable let statement. The entity group definition is saved as part of the database metadata.

Permissions

You must have at least Database Admin permissions to run this command.

Syntax

.create entity_group EntityGroupName [ifnotexists] ([EntityReference, ...])

Learn more about syntax conventions.

Parameters

Name Type Required Description
ifnotexists string If specified, the entity group is only created if the entity group doesn't exist yet.
EntityGroupName string ✔️ The name of the entity group.
EntityReference string ✔️ An entity included in the entity group.

Returns

This command returns a table with the following columns:

Output parameter Type Description
Name string The name of the entity group.
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.

Examples

The following example creates the MyEntityGroup entity group with two entities, cluster('c1').database('d1') and cluster('c2').database('d2').

.create entity_group MyEntityGroup (cluster('c1').database('d1'), cluster('c2').database('d2'))
Name Entities
MyEntityGroup ["cluster('c1').database('d1')","cluster('c2').database('d2')"]