private static string PropertyList()

in src/Kusto.Language/EngineCommands.cs [1697:2238]


        private static string PropertyList(string propertyNameRule = null) =>
            string.IsNullOrEmpty(propertyNameRule)
                ? "with '('! { PropertyName=<name> '='! PropertyValue=<value>, ',' }+ ')'"
                : $"with '('! {{ PropertyName=({propertyNameRule} | <name>) '='! PropertyValue=<value>, ',' }}+ ')'";

        private static readonly string DataIngestionPropertyList =
            PropertyList(
                "ingestionMapping | ingestionMappingReference | creationTime | distributed | docstring | extend_schema | folder | format | ingestIfNotExists | " +
                "ignoreFirstRecord | persistDetails | policy_ingestionTime | recreate_schema | tags | validationPolicy | zipPattern");

        public static readonly CommandSymbol IngestIntoTable =
            new CommandSymbol(nameof(IngestIntoTable),
                $"ingest [async] into table! TableName=<table> {PathOrPathList} [{DataIngestionPropertyList}]",
                "(ExtentId: guid, ItemLoaded: string, Duration: string, HasErrors: string, OperationId: guid)");

        public static readonly CommandSymbol IngestInlineIntoTable =
            new CommandSymbol(nameof(IngestInlineIntoTable),
                $"ingest inline into! table TableName=<name> ('[' Data=<bracketed_input_data> ']' | {DataIngestionPropertyList} '<|'! Data=<input_data> | '<|' Data=<input_data>)",
                "(ExtentId: guid)");

        private static readonly string DataIngestionSetAppendResult =
            "(ExtentId: guid, OriginalSize: long, ExtentSize: long, ColumnSize: long, IndexSize: long, RowCount: long)";

        public static readonly CommandSymbol SetTable =
            new CommandSymbol(nameof(SetTable),
                $"set [async] TableName=<name> [{DataIngestionPropertyList}] '<|' QueryOrCommand=<input_query>",
                DataIngestionSetAppendResult);

        public static readonly CommandSymbol AppendTable =
            new CommandSymbol(nameof(AppendTable),
                $"append [async] TableName=<table> [{DataIngestionPropertyList}] '<|' QueryOrCommand=<input_query>",
                DataIngestionSetAppendResult);

        public static readonly CommandSymbol SetOrAppendTable =
            new CommandSymbol(nameof(SetOrAppendTable),
                $"set-or-append [async] TableName=<name> [{DataIngestionPropertyList}] '<|' QueryOrCommand=<input_query>",
                DataIngestionSetAppendResult);

        public static readonly CommandSymbol SetOrReplaceTable =
            new CommandSymbol(nameof(SetOrReplaceTable),
                $"set-or-replace [async] TableName=<name> [{DataIngestionPropertyList}] '<|' QueryOrCommand=<input_query>",
                DataIngestionSetAppendResult);
        #endregion

        #region Data Export
        private static string DataConnectionStringList = "'(' { DataConnectionString=<string>, ',' }+ ')'";

        public static readonly CommandSymbol ExportToStorage =
            new CommandSymbol(nameof(ExportToStorage),
                $"export [async] [compressed] to (csv|tsv|json|parquet) {DataConnectionStringList} [{PropertyList()}] '<|' Query=<input_query>",
                UnknownResult);

        public static readonly CommandSymbol ExportToSqlTable =
            new CommandSymbol(nameof(ExportToSqlTable),
                $"export [async] to sql SqlTableName=<name> SqlConnectionString=<string> [{PropertyList()}] '<|' Query=<input_query>",
                UnknownResult);

        public static readonly CommandSymbol ExportToExternalTable =
            new CommandSymbol(nameof(ExportToExternalTable),
                $"export [async] to table ExternalTableName=<externaltable> [{PropertyList()}] '<|' Query=<input_query>",
                UnknownResult);

        private static readonly string OverClause = "over '('! { TableName=<name>, ',' }+ ')'";

        public static readonly CommandSymbol CreateOrAlterContinuousExport =
            new CommandSymbol(nameof(CreateOrAlterContinuousExport),
                $"create-or-alter continuous-export ContinuousExportName=<name> [{OverClause}] to table ExternalTableName=<externaltable> [{PropertyList()}] '<|' Query=<input_query>",
                UnknownResult);

        private static readonly string ShowContinuousExportResult =
            "(Name: string, ExternalTableName: string, Query: string, " +
            "ForcedLatency: timespan, IntervalBetweenRuns: timespan, CursorScopedTables: string, ExportProperties: string, " +
            "LastRunTime: datetime, StartCursor: string, IsDisabled: bool, LastRunResult: string, ExportedTo: datetime, IsRunning: bool)";

        public static readonly CommandSymbol ShowContinuousExport =
            new CommandSymbol(nameof(ShowContinuousExport),
                "show continuous-export ContinuousExportName=<name>",
                ShowContinuousExportResult);

        public static readonly CommandSymbol ShowContinuousExports =
            new CommandSymbol(nameof(ShowContinuousExports),
                "show continuous-exports",
                ShowContinuousExportResult);

        public static readonly CommandSymbol ShowClusterPendingContinuousExports =
            new CommandSymbol(nameof(ShowClusterPendingContinuousExports),
                $"show cluster pending continuous-exports [{PropertyList()}]",
                ShowContinuousExportResult);

        public static readonly CommandSymbol ShowContinuousExportExportedArtifacts =
            new CommandSymbol(nameof(ShowContinuousExportExportedArtifacts),
                "show continuous-export ContinuousExportName=<name> exported-artifacts",
                "(Timestamp: datetime, ExternalTableName: string, Path: string, NumRecords: long)");

        public static readonly CommandSymbol ShowContinuousExportFailures =
            new CommandSymbol(nameof(ShowContinuousExportFailures),
                "show continuous-export ContinuousExportName=<name> failures",
                "(Timestamp: datetime, OperationId: string, Name: string, LastSuccessRun: datetime, FailureKind: string, Details: string)");

        public static readonly CommandSymbol SetContinuousExportCursor =
            new CommandSymbol(nameof(SetContinuousExportCursor),
                "set continuous-export jobName=<name> cursor to cursorValue=<string>",
                UnknownResult);

        public static readonly CommandSymbol DropContinuousExport =
            new CommandSymbol(nameof(DropContinuousExport),
                "drop continuous-export ContinuousExportName=<name>",
                ShowContinuousExportResult);

        public static readonly CommandSymbol EnableContinuousExport =
            new CommandSymbol(nameof(EnableContinuousExport),
                "enable continuous-export ContinuousExportName=<name>",
                ShowContinuousExportResult);

        public static readonly CommandSymbol DisableContinuousExport =
            new CommandSymbol(nameof(DisableContinuousExport),
                "disable continuous-export ContinousExportName=<name>",
                ShowContinuousExportResult);

        #endregion

        #region Materialized Views

        private static readonly string MaterializedViewCreatePropertyList =
            PropertyList("lookback | backfill | effectiveDateTime | updateExtentsCreationTime | autoUpdateSchema | dimensionTables | folder | docString");

        private static readonly string MaterializedViewAlterPropertyList =
            PropertyList("lookback | dimensionTables");

        private static readonly string ShowMaterializedViewResult =
           "(Name: string, SourceTable: string, Query: string, " +
           "MaterializedTo: datetime, LastRun: datetime, LastRunResult: string, IsHealthy: bool, " +
           "IsEnabled: bool, Folder: string, DocString: string, AutoUpdateSchema: bool, EffectiveDateTime: datetime, Lookback:timespan)";

        private static readonly string ShowMaterializedViewsDetailsResult =
            "(MaterializedViewName: string, DatabaseName: string, Folder: string, DocString: string, TotalExtents: long, TotalExtentSize: real, TotalOriginalSize: real, TotalRowCount: long, HotExtents: long, HotExtentSize: real, HotOriginalSize: real, HotRowCount: long, AuthorizedPrincipals: string, RetentionPolicy: string, CachingPolicy: string, ShardingPolicy: string, MergePolicy: string, MinExtentsCreationTime: datetime, MaxExtentsCreationTime: datetime)";

        public static readonly CommandSymbol CreateMaterializedView =
            new CommandSymbol(nameof(CreateMaterializedView),
                $"create [async] materialized-view [{MaterializedViewCreatePropertyList}] " +
                "MaterializedViewName=<name> on table <table> <function_body>",
                UnknownResult);

        public static readonly CommandSymbol RenameMaterializedView =
            new CommandSymbol(nameof(RenameMaterializedView),
                "rename materialized-view MaterializedViewName=<materializedview> to NewMaterializedViewName=<name>",
                ShowMaterializedViewResult);

        public static readonly CommandSymbol ShowMaterializedView =
           new CommandSymbol(nameof(ShowMaterializedView),
               "show materialized-view MaterializedViewName=<materializedview>",
               ShowMaterializedViewResult);

        public static readonly CommandSymbol ShowMaterializedViews =
           new CommandSymbol(nameof(ShowMaterializedViews),
               "show materialized-views",
               ShowMaterializedViewResult);

        public static readonly CommandSymbol ShowMaterializedViewsDetails =
            new CommandSymbol(nameof(ShowMaterializedViewsDetails),
                "show materialized-views ['(' { MaterializedViewName=<materializedview>, ',' }+ ')'] details",
                ShowMaterializedViewsDetailsResult);

        public static readonly CommandSymbol ShowMaterializedViewDetails =
            new CommandSymbol(nameof(ShowMaterializedViewDetails),
                "show materialized-view MaterializedViewName=<materializedview> details",
                ShowMaterializedViewsDetailsResult);

        public static readonly CommandSymbol ShowMaterializedViewPolicyRetention =
            new CommandSymbol(nameof(ShowMaterializedViewPolicyRetention),
                "show materialized-view MaterializedViewName=<materializedview> policy retention",
                PolicyResult);

        public static readonly CommandSymbol ShowMaterializedViewPolicyMerge =
            new CommandSymbol(nameof(ShowMaterializedViewPolicyMerge),
                "show materialized-view MaterializedViewName=<materializedview> policy merge",
                PolicyResult);

        public static readonly CommandSymbol ShowMaterializedViewPolicyPartitioning =
           new CommandSymbol(nameof(ShowMaterializedViewPolicyPartitioning),
               "show materialized-view MaterializedViewName=<materializedview> policy partitioning",
               PolicyResult);

        public static readonly CommandSymbol ShowMaterializedViewExtents =
            new CommandSymbol(nameof(ShowMaterializedViewExtents),
                 $"show materialized-view MaterializedViewName=<materializedview> extents [{ExtentIdList}] [hot]",
                "(ExtentId: guid, DatabaseName: string, TableName: string, MaxCreatedOn: datetime, OriginalSize: real, ExtentSize: real, CompressedSize: real, IndexSize: real, Blocks: long, Segments: long, ExtentContainerId: string, RowCount: long, MinCreatedOn: datetime, Tags: string, Kind: string, DeletedRowCount: long)");

        public static readonly CommandSymbol AlterMaterializedView =
            new CommandSymbol(nameof(AlterMaterializedView),
                $"alter materialized-view [{MaterializedViewAlterPropertyList}] MaterializedViewName=<materializedview> on table <table> <function_body>",
                ShowMaterializedViewResult);

        public static readonly CommandSymbol CreateOrAlterMaterializedView =
            new CommandSymbol(nameof(CreateOrAlterMaterializedView),
                $"create-or-alter materialized-view [{MaterializedViewCreatePropertyList}] MaterializedViewName=<materializedview> on table <table> <function_body>",
                ShowMaterializedViewResult);

        public static readonly CommandSymbol DropMaterializedView =
            new CommandSymbol(nameof(DropMaterializedView),
                $"drop materialized-view MaterializedViewName=<materializedview>",
                ShowMaterializedViewResult);

        public static readonly CommandSymbol EnableDisableMaterializedView =
            new CommandSymbol(nameof(EnableDisableMaterializedView),
                $"(enable | disable) materialized-view MaterializedViewName=<materializedview>",
                ShowMaterializedViewResult);

        public static readonly CommandSymbol ShowMaterializedViewPrincipals =
            new CommandSymbol(nameof(ShowMaterializedViewPrincipals),
                "show materialized-view MaterializedViewName=<materializedview> principals",
                ShowPrincipalsResult);

        public static readonly CommandSymbol ShowMaterializedViewSchemaAsJson =
            new CommandSymbol(nameof(ShowMaterializedViewSchemaAsJson),
                "show materialized-view MaterializedViewName=<materializedview> schema as json",
                ShowTableSchemaResult);

        public static readonly CommandSymbol ShowMaterializedViewCslSchema =
            new CommandSymbol(nameof(ShowMaterializedViewCslSchema),
                "show materialized-view MaterializedViewName=<materializedview> cslschema",
                ShowTableSchemaResult);

        public static readonly CommandSymbol AlterMaterializedViewFolder =
            new CommandSymbol(nameof(AlterMaterializedViewFolder),
                "alter materialized-view MaterializedViewName=<materializedview> folder Folder=<string>",
                ShowMaterializedViewResult);

        public static readonly CommandSymbol AlterMaterializedViewDocString =
            new CommandSymbol(nameof(AlterMaterializedViewDocString),
                "alter materialized-view MaterializedViewName=<materializedview> docstring Documentation=<string>",
                ShowMaterializedViewResult);

        public static readonly CommandSymbol AlterMaterializedViewLookback =
            new CommandSymbol(nameof(AlterMaterializedViewLookback),
                "alter materialized-view MaterializedViewName=<materializedview> lookback Lookback=<timespan>",
                ShowMaterializedViewResult);

        public static readonly CommandSymbol AlterMaterializedViewAutoUpdateSchema =
            new CommandSymbol(nameof(AlterMaterializedViewAutoUpdateSchema),
                "alter materialized-view MaterializedViewName=<materializedview> autoUpdateSchema (true|false)",
                ShowMaterializedViewResult);

        public static readonly CommandSymbol ClearMaterializedViewData =
           new CommandSymbol(nameof(ClearMaterializedViewData),
               "clear materialized-view MaterializedViewName=<materializedview> data",
               "(ExtentId: guid, TableName: string, CreatedOn: datetime)");

        public static readonly CommandSymbol SetMaterializedViewCursor =
            new CommandSymbol(nameof(SetMaterializedViewCursor),
                "set materialized-view MaterializedViewName=<materializedview> cursor to CursorValue=<string>",
                UnknownResult);

        #endregion

        #region System Information Commands
        public static readonly CommandSymbol ShowCluster =
            new CommandSymbol(nameof(ShowCluster),
                "show cluster",
                "(NodeId: string, Address: string, Name: string, StartTime: string, IsAdmin: bool, " +
                    "MachineTotalMemory: long, MachineAvailableMemory: long, ProcessorCount: int, EnvironmentDescription: string)");

        public static readonly CommandSymbol ShowDiagnostics =
            new CommandSymbol(nameof(ShowDiagnostics),
                "show diagnostics [with '(' scope '=' Scope=(cluster | workloadgroup) ')']",
                new TableSymbol(
                    new ColumnSymbol("IsHealthy", ScalarTypes.Bool),
                    new ColumnSymbol("EnvironmentDescription", ScalarTypes.String),
                    new ColumnSymbol("IsScaleOutRequired", ScalarTypes.Bool),
                    new ColumnSymbol("MachinesTotal", ScalarTypes.Int),
                    new ColumnSymbol("MachinesOffline", ScalarTypes.Int),
                    new ColumnSymbol("NodeLastRestartedOn", ScalarTypes.DateTime),
                    new ColumnSymbol("AdminLastElectedOn", ScalarTypes.DateTime),
                    // snew ColumnSymbol("ReservedSlot2", ScalarTypes.Real),
                    new ColumnSymbol("ExtentsTotal", ScalarTypes.Int),
                    new ColumnSymbol("DiskColdAllocationPercentage", ScalarTypes.Int),
                    new ColumnSymbol("InstancesTargetBasedOnDataCapacity", ScalarTypes.Int),
                    new ColumnSymbol("TotalOriginalDataSize", ScalarTypes.Real),
                    new ColumnSymbol("TotalExtentSize", ScalarTypes.Real),
                    new ColumnSymbol("IngestionsLoadFactor", ScalarTypes.Real),
                    new ColumnSymbol("IngestionsInProgress", ScalarTypes.Long),
                    new ColumnSymbol("IngestionsSuccessRate", ScalarTypes.Real),
                    new ColumnSymbol("MergesInProgress", ScalarTypes.Long),
                    new ColumnSymbol("BuildVersion", ScalarTypes.String),
                    new ColumnSymbol("BuildTime", ScalarTypes.DateTime),
                    new ColumnSymbol("ClusterDataCapacityFactor", ScalarTypes.Real),
                    new ColumnSymbol("IsDataWarmingRequired", ScalarTypes.Bool),
                    // new ColumnSymbol("ReservedSlot3", ScalarTypes.String),
                    new ColumnSymbol("DataWarmingLastRunOn", ScalarTypes.DateTime),
                    new ColumnSymbol("MergesSuccessRate", ScalarTypes.Real),
                    new ColumnSymbol("NotHealthyReason", ScalarTypes.String),
                    new ColumnSymbol("IsAttentionRequired", ScalarTypes.Bool),
                    new ColumnSymbol("AttentionRequiredReason", ScalarTypes.String),
                    new ColumnSymbol("ProductVersion", ScalarTypes.String),
                    new ColumnSymbol("FailedIngestOperations", ScalarTypes.Int),
                    new ColumnSymbol("FailedMergeOperations", ScalarTypes.Int),
                    new ColumnSymbol("MaxExtentsInSingleTable", ScalarTypes.Int),
                    new ColumnSymbol("TableWithMaxExtents", ScalarTypes.String),
                    new ColumnSymbol("WarmExtentSize", ScalarTypes.Real),
                    new ColumnSymbol("NumberOfDatabases", ScalarTypes.Int),
                    new ColumnSymbol("PurgeExtentsRebuildLoadFactor", ScalarTypes.Real),
                    new ColumnSymbol("PurgeExtentsRebuildInProgress", ScalarTypes.Long),
                    new ColumnSymbol("PurgesInProgress", ScalarTypes.Long),
                    new ColumnSymbol("MaxSoftRetentionPolicyViolation", ScalarTypes.TimeSpan),
                    // new ColumnSymbol("ReservedSlot4", ScalarTypes.String),
                    new ColumnSymbol("RowStoreLocalStorageCapacityFactor", ScalarTypes.Real),
                    new ColumnSymbol("ExportsLoadFactor", ScalarTypes.Real),
                    new ColumnSymbol("ExportsInProgress", ScalarTypes.Long),
                    new ColumnSymbol("PendingContinuousExports", ScalarTypes.Long),
                    new ColumnSymbol("MaxContinuousExportLatenessMinutes", ScalarTypes.Long),
                    new ColumnSymbol("RowStoreSealsInProgress", ScalarTypes.Long),
                    new ColumnSymbol("IsRowStoreUnhealthy", ScalarTypes.Bool),
                    new ColumnSymbol("MachinesSuspended", ScalarTypes.Int),
                    new ColumnSymbol("DataPartitioningLoadFactor", ScalarTypes.Real),
                    new ColumnSymbol("DataPartitioningOperationsInProgress", ScalarTypes.Long),
                    new ColumnSymbol("MinPartitioningPercentageInSingleTable", ScalarTypes.Real),
                    new ColumnSymbol("TableWithMinPartitioningPercentage", ScalarTypes.String),
                    new ColumnSymbol("V2DataCapacityFactor", ScalarTypes.Real),
                    new ColumnSymbol("V3DataCapacityFactor", ScalarTypes.Real),
                    new ColumnSymbol("CurrentDiskCacheShardsPercentage", ScalarTypes.Int),
                    new ColumnSymbol("TargetDiskCacheShardsPercentage", ScalarTypes.Int),
                    new ColumnSymbol("MaterializedViewsInProgress", ScalarTypes.Long),
                    new ColumnSymbol("DataPartitioningOperationsInProgress", ScalarTypes.Real),
                    new ColumnSymbol("IngestionCapacityUtilization", ScalarTypes.Real),
                    new ColumnSymbol("ShardsWarmingStatus", ScalarTypes.String),
                    new ColumnSymbol("ShardsWarmingTemperature", ScalarTypes.Real),
                    new ColumnSymbol("ShardsWarmingDetails", ScalarTypes.String),
                    new ColumnSymbol("StoredQueryResultsInProgress", ScalarTypes.Long),
                    new ColumnSymbol("HotDataDiskSpaceUsage", ScalarTypes.Real)
                ));

        public static readonly CommandSymbol ShowCapacity =
            new CommandSymbol(nameof(ShowCapacity),
                "show capacity [with '(' scope '=' Scope=(cluster | workloadgroup) ')']",
                "(Resource: string, Total: long, Consumed: long, Remaining: long)");

        public static readonly CommandSymbol ShowOperations =
            new CommandSymbol(nameof(ShowOperations),
                "show operations [(OperationId=<guid> | '(' { OperationId=<guid>, ',' }+ ')')]",
                "(OperationId: guid, Operation: string, NodeId: string, StartedOn: datetime, LastUpdatedOn: datetime, Duration: timespan, State: string, Status: string, RootActivityId: guid, ShouldRetry: bool, Database: string, Principal: string, User: string, AdminEpochStartTime: datetime)");

        public static readonly CommandSymbol ShowOperationDetails =
            new CommandSymbol(nameof(ShowOperationDetails),
                "show operation OperationId=<guid> details",
                UnknownResult); // schema depends on operation

        private static readonly string JournalResult =
            "(Event: string, EventTimestamp: datetime, Database: string, EntityName: string, UpdatedEntityName: string, EntityVersion: string, EntityContainerName: string, " +
            "OriginalEntityState: string, UpdatedEntityState: string, ChangeCommand: string, Principal: string, RootActivityId: guid, ClientRequestId: string, " +
            "User: string, OriginalEntityVersion: string)";

        public static readonly CommandSymbol ShowJournal =
            new CommandSymbol(nameof(ShowJournal),
                "show journal",
                JournalResult);

        public static readonly CommandSymbol ShowDatabaseJournal =
            new CommandSymbol(nameof(ShowDatabaseJournal),
                "show database DatabaseName=<database> journal",
                JournalResult);

        public static readonly CommandSymbol ShowClusterJournal =
            new CommandSymbol(nameof(ShowClusterJournal),
                "show cluster journal",
                JournalResult);

        private static readonly string QueryResults =
            "(ClientActivityId: string, Text: string, Database: string, StartedOn: datetime, LastUpdatedOn: datetime, Duration: timespan, " +
            "State: string, RootActivityId: guid, User: string, FailureReason: string, TotalCpu: timespan, CacheStatistics: dynamic, " +
            "Application: string, MemoryPeak: long, ScannedEventStatistics: dynamic, Pricipal: string, ClientRequestProperties: dynamic, ResultSetStatistics: dynamic, WorkloadGroup: string)";

        public static readonly CommandSymbol ShowQueries =
            new CommandSymbol(nameof(ShowQueries),
                "show queries",
                "(ClientActivityId: string, Text: string, Database: string, StartedOn: datetime, LastUpdatedOn: datetime, Duration: timespan, State: string, RootActivityId: guid, User: string, FailureReason: string, TotalCpu: timespan, CacheStatistics: dynamic, Application: string, MemoryPeak: long, ScannedExtentsStatistics: dynamic, Principal: string, ClientRequestProperties: dynamic, ResultSetStatistics: dynamic, WorkloadGroup: string)");

        public static readonly CommandSymbol ShowRunningQueries =
            new CommandSymbol(nameof(ShowRunningQueries),
                "show running queries [by (user UserName=<string> | '*')]",
                QueryResults);

        public static readonly CommandSymbol CancelQuery =
            new CommandSymbol(nameof(CancelQuery),
                "cancel query ClientRequestId=<string>",
                UnknownResult);

        private static readonly string ShowQueryPlanPropertyList =
            PropertyList("reconstructCsl"
                );

        public static readonly CommandSymbol ShowQueryPlan =
            new CommandSymbol(nameof(ShowQueryPlan),
                $"show queryplan [{ShowQueryPlanPropertyList}] '<|' Query=<input_query>",
                "(ResultType: string, Format: string, Content: string)");

        public static readonly CommandSymbol ShowBasicAuthUsers =
            new CommandSymbol(nameof(ShowBasicAuthUsers),
                "show basicauth users",
                "(UserName: string)");

        public static readonly CommandSymbol CreateBasicAuthUser =
            new CommandSymbol(nameof(CreateBasicAuthUser),
                "create basicauth user UserName=<string> [password Password=<string>]",
                UnknownResult);

        public static readonly CommandSymbol DropBasicAuthUser =
            new CommandSymbol(nameof(DropBasicAuthUser),
                "drop basicauth user UserName=<string>",
                UnknownResult);

        public static readonly CommandSymbol ShowCache =
            new CommandSymbol(nameof(ShowCache),
                "show cache",
                "(NodeId: string, TotalMemoryCapacity: long, MemoryCacheCapacity: long, MemoryCacheInUse: long, MemoryCacheHitCount: long, " +
                "TotalDiskCapacity: long, DiskCacheCapacity: long, DiskCacheInUse: long, DiskCacheHitCount: long, DiskCacheMissCount: long, " +
                "MemoryCacheDetails: string, DiskCacheDetails: string)");

        public static readonly CommandSymbol AlterCache =
            new CommandSymbol(nameof(AlterCache),
                "alter cache on ('*' | NodeList=<bracketed_string>) Action=<bracketed_string>",
                UnknownResult);

        public static readonly CommandSymbol ShowCommands =
            new CommandSymbol(nameof(ShowCommands),
                "show commands",
                "(ClientActivityId: string, CommandType: string, Text: string, Database: string, " +
                "StartedOn: datetime, LastUpdatedOn: datetime, Duration: timespan, State: string, RootActivityId: guid, " +
                "User: string, FailureReason: string, Application: string, Principal: string, TotalCpu: timespan, " +
                "ResourcesUtilization: dynamic, ClientRequestProperties: dynamic, WorkloadGroup: string)");

        public static readonly CommandSymbol ShowCommandsAndQueries =
            new CommandSymbol(nameof(ShowCommandsAndQueries),
                "show commands-and-queries",
                "(ClientActivityId: string, CommandType: string, Text: string, Database: string, " +
                "StartedOn: datetime, LastUpdatedOn: datetime, Duration: timespan, State: string, FailureReason: string, RootActivityId: guid, " +
                "User: string, Application: string, Principal: string, ClientRequestProperties: dynamic, " +
                "TotalCpu: timespan, MemoryPeak: long, CacheStatistics: dynamic, ScannedExtentsStatistics: dynamic, ResultSetStatistics: dynamic, WorkloadGroup: string)");

        public static readonly CommandSymbol ShowIngestionFailures =
            new CommandSymbol(nameof(ShowIngestionFailures),
                "show ingestion failures [with '(' OperationId '=' OperationId=<guid> ')']",
                "(OperationId: guid, Database: string, Table: string, FailedOn: datetime, IngestionSourcePath: string, Details: string, FailureKind: string, RootActivityId: guid, OperationKind: string, OriginatesFromUpdatePolicy: bool, ErrorCode: string, Principal: string, ShouldRetry: bool, User: string, IngestionProperties: string)");
        #endregion

        #region Advanced Commands
        private static readonly string ShowExtentsResult = "(ExtentId: guid, DatabaseName: string, TableName: string, MaxCreatedOn: datetime, OriginalSize: real, ExtentSize: real, CompressedSize: real, IndexSize: real, Blocks: long, Segments: long, ExtentContainerId: string, RowCount: long, MinCreatedOn: datetime, Tags: string, Kind: string, DeletedRowCount: long)";
        private static readonly string ShowExtentsMetadataResult = "(ExtentId: guid, DatabaseName: string, TableName: string, ExtentMetadata: string)";

        private static readonly string TagWhereClause = "where { tags (has | contains | '!has' | '!contains')! Tag=<string>, and }+";
        private static readonly string WithFilteringPolicyClause = "with '(' extentsShowFilteringRuntimePolicy '=' policy=<value> ')' ";
        private static readonly string ShowExtentsSuffix = $"[{TagWhereClause}] [{WithFilteringPolicyClause}]";

        #region Cluster extents
        public static readonly CommandSymbol ShowClusterExtents =
            new CommandSymbol(nameof(ShowClusterExtents),
                $"show cluster extents [{ExtentIdList}] [hot] {ShowExtentsSuffix}",
                ShowExtentsResult);

        public static readonly CommandSymbol ShowClusterExtentsMetadata =
            new CommandSymbol(nameof(ShowClusterExtentsMetadata),
                $"show cluster extents [{ExtentIdList}] [hot] metadata {ShowExtentsSuffix}",
                ShowExtentsMetadataResult);
        #endregion

        #region Database extents
        public static readonly CommandSymbol ShowDatabaseExtents =
            new CommandSymbol(nameof(ShowDatabaseExtents),
                $"show (database [DatabaseName=<database>] | databases {DatabasesNameList}) extents [{ExtentIdList}] [hot] {ShowExtentsSuffix}",
                ShowExtentsResult);

        public static readonly CommandSymbol ShowDatabaseExtentsMetadata =
            new CommandSymbol(nameof(ShowDatabaseExtentsMetadata),
                $"show (database [DatabaseName=<database>] | databases {DatabasesNameList}) extents [{ExtentIdList}] [hot] metadata {ShowExtentsSuffix}",
                ShowExtentsMetadataResult);

        public static readonly CommandSymbol ShowDatabaseExtentTagsStatistics =
            new CommandSymbol(nameof(ShowDatabaseExtentTagsStatistics),
                $"show database extent tags statistics [with '(' minCreationTime '=' minCreationTime=<value> ')']",
                "(TableName: string, TotalExtentsCount: long, TaggedExtentsCount: long, TotalTagsCount: long, TotalTagsLength: long, DropByTagsCount: long, DropByTagsLength: long, IngestByTagsCount: long, IngestByTagsLength: long)");
        #endregion

        #region Table extents
        public static readonly CommandSymbol ShowTableExtents =
            new CommandSymbol(nameof(ShowTableExtents),
                $"show (table TableName=<table> | tables {TableNameList}) extents [{ExtentIdList}] [hot] {ShowExtentsSuffix}",
                ShowExtentsResult);

        public static readonly CommandSymbol ShowTableExtentsMetadata =
            new CommandSymbol(nameof(ShowTableExtentsMetadata),
                $"show (table TableName=<table> | tables {TableNameList}) extents [{ExtentIdList}] [hot] metadata {ShowExtentsSuffix}",
                ShowExtentsMetadataResult);
        #endregion

        private static readonly string MergeExtentsResult =
            "(OriginalExtentId: string, ResultExtentId: string, Duration: timespan)";

        private static readonly string GuidList = "'(' {GUID=<guid>, ','}+ ')'";
        public static readonly CommandSymbol MergeExtents =
            new CommandSymbol(nameof(MergeExtents),
                $"merge [async] TableName=<table> {GuidList} [with '(' rebuild '=' true ')']",
                MergeExtentsResult);

        public static readonly CommandSymbol MergeExtentsDryrun =
            new CommandSymbol(nameof(MergeExtentsDryrun),
                $"merge dryrun TableName=<table> {GuidList}",
                MergeExtentsResult);

        private static readonly string MoveExtentsResult =
            "(OriginalExtentId: string, ResultExtentId: string, Details: string)";

        public static readonly CommandSymbol MoveExtentsFrom =
            new CommandSymbol(nameof(MoveExtentsFrom),
                $"move [async] extents (all | {GuidList}) from table SourceTableName=<table> to table DestinationTableName=<table>",
                MoveExtentsResult);

        public static readonly CommandSymbol MoveExtentsQuery =
            new CommandSymbol(nameof(MoveExtentsQuery),
                $"move [async] extents to table DestinationTableName=<table> '<|' Query=<input_query>",
                MoveExtentsResult);

        public static readonly CommandSymbol ReplaceExtents =
            new CommandSymbol(nameof(ReplaceExtents),
                $"replace [async] extents in table DestinationTableName=<table> '<|' '{{' ExtentsToDropQuery=<input_query> '}}' ',' '{{' ExtentsToMoveQuery=<input_query> '}}'",
                MoveExtentsResult);

        private static readonly string DropExtentResult =
            "(ExtentId: guid, TableName: string, CreatedOn: datetime)";

        //public static readonly CommandSymbol DropExtentsQuery =
        //    new CommandSymbol("drop extents query", "drop extents [whatif] '<|' Query=<input_query>", DropExtentResult);

        public static readonly CommandSymbol DropExtent =
            new CommandSymbol(nameof(DropExtent),
                "drop extent ExtentId=<guid> [from TableName=<table>]",
                DropExtentResult);

        private static readonly string DropProperties = "[older Older=<long> (days | hours)] from (all tables! | TableName=<table>) [trim by! (extentsize | datasize) TrimSize=<long> (MB | GB | bytes)] [limit LimitCount=<long>]";

        public static readonly CommandSymbol DropExtents =
            new CommandSymbol(nameof(DropExtents),
                @"drop extents 
                    ('(' { ExtentId=<guid>, ',' }+ ')' [from TableName=<table>]