Skip to content

Datatable Chart Panel Configuration

The Datatable chart panel displays tabular data with customizable columns, sorting, pagination, and formatting options. Perfect for displaying detailed records and performing quick data analysis.

A Poem for the Spreadsheet Scholars

For those who know that sometimes you just need to see the rows:

When charts and graphs just won't suffice,
And visual flair must pay the price,
The datatable stands, precise and plain—
Row after row, your data's domain.

Sort ascending, descending too,
Filter down to just a few.
Columns wide or columns tight,
Pages of data that just feel right.

Metrics summed at bottom's end,
Summary rows, your data's friend.
From service names to error codes,
Each cell tells a tale until it folds.

Left-align text and right-align numbers,
No visual tricks, no chart encumbers.
Just pure data, clean and true—
A dream come true for someone like you.

So here's to rows and columns straight,
To tables that enumerate:
Sometimes the simplest view prevails,
When details matter, datatable never fails!

Lens Datatable Charts

Represents a Datatable chart configuration within a Lens panel.

Datatable charts display tabular data with customizable columns, sorting, pagination, and formatting options.

Examples:

Simple datatable with metrics and breakdowns:

lens:
  type: datatable
  data_view: "metrics-*"
  metrics:
    - id: "service-count"
      field: "service.name"
      aggregation: count
  breakdowns:
    - id: "service-breakdown"
      type: values
      field: "service.name"

Datatable with sorting and pagination:

lens:
  type: datatable
  data_view: "logs-*"
  metrics:
    - id: "error-count"
      aggregation: count
      filter:
        kql: "log.level:error"
  breakdowns:
    - id: "service"
      type: values
      field: "service.name"
  sorting:
    column_id: "error-count"
    direction: desc
  paging:
    enabled: true
    page_size: 25

Attributes:

Name Type Description
data_view str

The data view that determines the data for the datatable chart.

metrics list[LensDatatableMetricTypes | LensDataMetricTypes]

List of metrics to display as columns.

breakdowns list[LensDatatableBreakdownTypes | LensBreakdownTypes]

List of breakdowns to use as row groupings.

metrics_split_by list[LensDatatableDimensionTypes | LensDimensionTypes] | None

Optional split-metrics-by dimensions (creates separate metric columns for each dimension value).

Show JSON schema:
{
  "$defs": {
    "CollapseAggregationEnum": {
      "description": "The aggregation to use for the dimension.",
      "enum": [
        "sum",
        "min",
        "max",
        "avg"
      ],
      "title": "CollapseAggregationEnum",
      "type": "string"
    },
    "ColorThreshold": {
      "additionalProperties": false,
      "description": "Single threshold band in a range-based color map.",
      "properties": {
        "up_to": {
          "description": "Upper bound for this threshold band.",
          "title": "Up To",
          "type": "number"
        },
        "color": {
          "description": "The color applied within this threshold band (hex color code).",
          "title": "Color",
          "type": "string"
        }
      },
      "required": [
        "up_to",
        "color"
      ],
      "title": "ColorThreshold",
      "type": "object"
    },
    "DatatableAlignmentEnum": {
      "description": "Alignment options for datatable columns.",
      "enum": [
        "left",
        "right",
        "center"
      ],
      "title": "DatatableAlignmentEnum",
      "type": "string"
    },
    "DatatableAppearance": {
      "additionalProperties": false,
      "description": "Appearance settings for datatable visualization.",
      "properties": {
        "row_height": {
          "$ref": "#/$defs/DatatableRowHeightEnum",
          "default": "auto",
          "description": "Row height mode."
        },
        "row_height_lines": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Number of lines for custom row height (only used with row_height='custom').",
          "title": "Row Height Lines"
        },
        "header_row_height": {
          "$ref": "#/$defs/DatatableRowHeightEnum",
          "default": "auto",
          "description": "Header row height mode."
        },
        "header_row_height_lines": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Number of lines for custom header row height (only used with header_row_height='custom').",
          "title": "Header Row Height Lines"
        },
        "density": {
          "$ref": "#/$defs/DatatableDensityEnum",
          "default": "normal",
          "description": "Grid density setting."
        }
      },
      "title": "DatatableAppearance",
      "type": "object"
    },
    "DatatableColorModeEnum": {
      "description": "Color mode options for datatable columns.",
      "enum": [
        "none",
        "cell",
        "text"
      ],
      "title": "DatatableColorModeEnum",
      "type": "string"
    },
    "DatatableColumnAppearance": {
      "additionalProperties": false,
      "description": "Appearance options shared by datatable metric and dimension columns.",
      "properties": {
        "width": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Column width in pixels.",
          "title": "Width"
        },
        "hidden": {
          "default": false,
          "description": "Whether to hide this column.",
          "title": "Hidden",
          "type": "boolean"
        },
        "one_click_filter": {
          "default": false,
          "description": "Enable one-click filtering for this column.",
          "title": "One Click Filter",
          "type": "boolean"
        },
        "alignment": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableAlignmentEnum"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Text alignment for the column."
        }
      },
      "title": "DatatableColumnAppearance",
      "type": "object"
    },
    "DatatableDensityEnum": {
      "description": "Density options for datatable.",
      "enum": [
        "compact",
        "normal",
        "expanded"
      ],
      "title": "DatatableDensityEnum",
      "type": "string"
    },
    "DatatableLensCountAggregatedMetric": {
      "additionalProperties": false,
      "description": "Datatable count metric with appearance options.",
      "properties": {
        "appearance": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableMetricAppearance"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Presentation options for this metric (width, alignment, summary row, etc.)."
        },
        "color": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableMetricColor"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Color display mode and optional range mapping for this metric."
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the metric. If not provided, a label may be inferred from the type and field.",
          "title": "Label"
        },
        "format": {
          "anyOf": [
            {
              "$ref": "#/$defs/LensMetricFormatTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The format of the metric."
        },
        "filter": {
          "anyOf": [
            {
              "$ref": "#/$defs/LegacyQueryTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A KQL filter applied before determining the metric value."
        },
        "aggregation": {
          "default": "count",
          "enum": [
            "count",
            "unique_count"
          ],
          "title": "Aggregation",
          "type": "string"
        },
        "field": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The field to count. If not provided, the count will be of all documents in the data view.",
          "title": "Field"
        },
        "exclude_zeros": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Whether to exclude zero values from the count. Kibana defaults to true if not specified.",
          "title": "Exclude Zeros"
        }
      },
      "title": "DatatableLensCountAggregatedMetric",
      "type": "object"
    },
    "DatatableLensDateHistogramBreakdown": {
      "additionalProperties": false,
      "description": "Datatable date-histogram breakdown with appearance options and collapse support.",
      "properties": {
        "appearance": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableColumnAppearance"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Presentation options for this dimension."
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the dimension. If not provided, a label may be inferred from the field and type.",
          "title": "Label"
        },
        "type": {
          "const": "date_histogram",
          "default": "date_histogram",
          "title": "Type",
          "type": "string"
        },
        "field": {
          "description": "The name of the field in the data view that this dimension is based on.",
          "title": "Field",
          "type": "string"
        },
        "minimum_interval": {
          "anyOf": [
            {
              "$ref": "#/$defs/LensDateMathMinimumInterval"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The minimum interval using Elasticsearch date math format (e.g. `1m`, `1h`). Defaults to `auto`."
        },
        "partial_intervals": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, show partial intervals. Kibana defaults to `true` if not specified.",
          "title": "Partial Intervals"
        },
        "collapse": {
          "anyOf": [
            {
              "$ref": "#/$defs/CollapseAggregationEnum"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Aggregate all breakdown values into a single bucket using this function (sum, avg, min, max)."
        }
      },
      "required": [
        "field"
      ],
      "title": "DatatableLensDateHistogramBreakdown",
      "type": "object"
    },
    "DatatableLensDateHistogramDimension": {
      "additionalProperties": false,
      "description": "Datatable date-histogram dimension with appearance options.",
      "properties": {
        "appearance": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableColumnAppearance"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Presentation options for this dimension."
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the dimension. If not provided, a label may be inferred from the field and type.",
          "title": "Label"
        },
        "type": {
          "const": "date_histogram",
          "default": "date_histogram",
          "title": "Type",
          "type": "string"
        },
        "field": {
          "description": "The name of the field in the data view that this dimension is based on.",
          "title": "Field",
          "type": "string"
        },
        "minimum_interval": {
          "anyOf": [
            {
              "$ref": "#/$defs/LensDateMathMinimumInterval"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The minimum interval using Elasticsearch date math format (e.g. `1m`, `1h`). Defaults to `auto`."
        },
        "partial_intervals": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, show partial intervals. Kibana defaults to `true` if not specified.",
          "title": "Partial Intervals"
        }
      },
      "required": [
        "field"
      ],
      "title": "DatatableLensDateHistogramDimension",
      "type": "object"
    },
    "DatatableLensFiltersBreakdown": {
      "additionalProperties": false,
      "description": "Datatable filters breakdown with appearance options and collapse support.",
      "properties": {
        "appearance": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableColumnAppearance"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Presentation options for this dimension."
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the dimension. If not provided, a label may be inferred from the field and type.",
          "title": "Label"
        },
        "type": {
          "const": "filters",
          "default": "filters",
          "title": "Type",
          "type": "string"
        },
        "filters": {
          "description": "The filters to use for the dimension.",
          "items": {
            "$ref": "#/$defs/LensFiltersDimensionFilter"
          },
          "title": "Filters",
          "type": "array"
        },
        "collapse": {
          "anyOf": [
            {
              "$ref": "#/$defs/CollapseAggregationEnum"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Aggregate all breakdown values into a single bucket using this function (sum, avg, min, max)."
        }
      },
      "required": [
        "filters"
      ],
      "title": "DatatableLensFiltersBreakdown",
      "type": "object"
    },
    "DatatableLensFiltersDimension": {
      "additionalProperties": false,
      "description": "Datatable filters dimension with appearance options.",
      "properties": {
        "appearance": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableColumnAppearance"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Presentation options for this dimension."
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the dimension. If not provided, a label may be inferred from the field and type.",
          "title": "Label"
        },
        "type": {
          "const": "filters",
          "default": "filters",
          "title": "Type",
          "type": "string"
        },
        "filters": {
          "description": "The filters to use for the dimension.",
          "items": {
            "$ref": "#/$defs/LensFiltersDimensionFilter"
          },
          "title": "Filters",
          "type": "array"
        }
      },
      "required": [
        "filters"
      ],
      "title": "DatatableLensFiltersDimension",
      "type": "object"
    },
    "DatatableLensFormulaMetric": {
      "additionalProperties": false,
      "description": "Datatable formula metric with appearance options.",
      "properties": {
        "appearance": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableMetricAppearance"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Presentation options for this metric (width, alignment, summary row, etc.)."
        },
        "color": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableMetricColor"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Color display mode and optional range mapping for this metric."
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the metric. If not provided, a label may be inferred from the type and field.",
          "title": "Label"
        },
        "format": {
          "anyOf": [
            {
              "$ref": "#/$defs/LensMetricFormatTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The format of the metric."
        },
        "filter": {
          "anyOf": [
            {
              "$ref": "#/$defs/LegacyQueryTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A KQL filter applied before determining the metric value."
        },
        "formula": {
          "description": "The formula string to be evaluated for this metric.",
          "title": "Formula",
          "type": "string"
        }
      },
      "required": [
        "formula"
      ],
      "title": "DatatableLensFormulaMetric",
      "type": "object"
    },
    "DatatableLensIntervalsBreakdown": {
      "additionalProperties": false,
      "description": "Datatable intervals breakdown with appearance options and collapse support.",
      "properties": {
        "appearance": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableColumnAppearance"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Presentation options for this dimension."
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the dimension. If not provided, a label may be inferred from the field and type.",
          "title": "Label"
        },
        "type": {
          "const": "intervals",
          "default": "intervals",
          "title": "Type",
          "type": "string"
        },
        "field": {
          "description": "The name of the field in the data view that this dimension is based on.",
          "title": "Field",
          "type": "string"
        },
        "intervals": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/LensIntervalsDimensionInterval"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The intervals to use for the dimension. If not provided, intervals will be automatically picked.",
          "title": "Intervals"
        },
        "granularity": {
          "anyOf": [
            {
              "maximum": 7,
              "minimum": 1,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Interval granularity divides the field into evenly spaced intervals based on the minimum and maximum values for the field.\nKibana defaults to 4 if not specified.",
          "title": "Granularity"
        },
        "include_empty_intervals": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, include empty histogram buckets. Defaults to `true`.",
          "title": "Include Empty Intervals"
        },
        "collapse": {
          "anyOf": [
            {
              "$ref": "#/$defs/CollapseAggregationEnum"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Aggregate all breakdown values into a single bucket using this function (sum, avg, min, max)."
        }
      },
      "required": [
        "field"
      ],
      "title": "DatatableLensIntervalsBreakdown",
      "type": "object"
    },
    "DatatableLensIntervalsDimension": {
      "additionalProperties": false,
      "description": "Datatable intervals dimension with appearance options.",
      "properties": {
        "appearance": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableColumnAppearance"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Presentation options for this dimension."
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the dimension. If not provided, a label may be inferred from the field and type.",
          "title": "Label"
        },
        "type": {
          "const": "intervals",
          "default": "intervals",
          "title": "Type",
          "type": "string"
        },
        "field": {
          "description": "The name of the field in the data view that this dimension is based on.",
          "title": "Field",
          "type": "string"
        },
        "intervals": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/LensIntervalsDimensionInterval"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The intervals to use for the dimension. If not provided, intervals will be automatically picked.",
          "title": "Intervals"
        },
        "granularity": {
          "anyOf": [
            {
              "maximum": 7,
              "minimum": 1,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Interval granularity divides the field into evenly spaced intervals based on the minimum and maximum values for the field.\nKibana defaults to 4 if not specified.",
          "title": "Granularity"
        },
        "include_empty_intervals": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, include empty histogram buckets. Defaults to `true`.",
          "title": "Include Empty Intervals"
        }
      },
      "required": [
        "field"
      ],
      "title": "DatatableLensIntervalsDimension",
      "type": "object"
    },
    "DatatableLensLastValueAggregatedMetric": {
      "additionalProperties": false,
      "description": "Datatable last-value metric with appearance options.",
      "properties": {
        "appearance": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableMetricAppearance"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Presentation options for this metric (width, alignment, summary row, etc.)."
        },
        "color": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableMetricColor"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Color display mode and optional range mapping for this metric."
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the metric. If not provided, a label may be inferred from the type and field.",
          "title": "Label"
        },
        "format": {
          "anyOf": [
            {
              "$ref": "#/$defs/LensMetricFormatTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The format of the metric."
        },
        "filter": {
          "anyOf": [
            {
              "$ref": "#/$defs/LegacyQueryTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A KQL filter applied before determining the metric value."
        },
        "aggregation": {
          "const": "last_value",
          "default": "last_value",
          "title": "Aggregation",
          "type": "string"
        },
        "field": {
          "title": "Field",
          "type": "string"
        },
        "date_field": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The field used to determine the 'last' value.",
          "title": "Date Field"
        }
      },
      "required": [
        "field"
      ],
      "title": "DatatableLensLastValueAggregatedMetric",
      "type": "object"
    },
    "DatatableLensMultiTermsBreakdown": {
      "additionalProperties": false,
      "description": "Datatable multi-terms breakdown with appearance options and collapse support.",
      "properties": {
        "appearance": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableColumnAppearance"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Presentation options for this dimension."
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the dimension. If not provided, a label may be inferred from the field and type.",
          "title": "Label"
        },
        "type": {
          "const": "values",
          "default": "values",
          "title": "Type",
          "type": "string"
        },
        "size": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The number of top terms to display.",
          "title": "Size"
        },
        "sort": {
          "anyOf": [
            {
              "$ref": "#/$defs/Sort"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The sort configuration for the terms."
        },
        "show_other_bucket": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, show a bucket for terms not included in the top size. Defaults to `true`.",
          "title": "Show Other Bucket"
        },
        "include_missing_values": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, show a bucket for documents with a missing value for the field. Defaults to `false`.",
          "title": "Include Missing Values"
        },
        "include": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A list of terms to include. Can be used with or without `include_is_regex`.",
          "title": "Include"
        },
        "exclude": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A list of terms to exclude. Can be used with or without `exclude_is_regex`.",
          "title": "Exclude"
        },
        "include_is_regex": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, treat the values in the `include` list as regular expressions. Defaults to `false`.",
          "title": "Include Is Regex"
        },
        "exclude_is_regex": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, treat the values in the `exclude` list as regular expressions. Defaults to `false`.",
          "title": "Exclude Is Regex"
        },
        "fields": {
          "description": "List of field names for multi-field aggregation. Requires at least 2 fields.",
          "items": {
            "type": "string"
          },
          "minItems": 2,
          "title": "Fields",
          "type": "array"
        },
        "collapse": {
          "anyOf": [
            {
              "$ref": "#/$defs/CollapseAggregationEnum"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Aggregate all breakdown values into a single bucket using this function (sum, avg, min, max)."
        }
      },
      "required": [
        "fields"
      ],
      "title": "DatatableLensMultiTermsBreakdown",
      "type": "object"
    },
    "DatatableLensMultiTermsDimension": {
      "additionalProperties": false,
      "description": "Datatable multi-terms dimension with appearance options.",
      "properties": {
        "appearance": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableColumnAppearance"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Presentation options for this dimension."
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the dimension. If not provided, a label may be inferred from the field and type.",
          "title": "Label"
        },
        "type": {
          "const": "values",
          "default": "values",
          "title": "Type",
          "type": "string"
        },
        "size": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The number of top terms to display.",
          "title": "Size"
        },
        "sort": {
          "anyOf": [
            {
              "$ref": "#/$defs/Sort"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The sort configuration for the terms."
        },
        "show_other_bucket": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, show a bucket for terms not included in the top size. Defaults to `true`.",
          "title": "Show Other Bucket"
        },
        "include_missing_values": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, show a bucket for documents with a missing value for the field. Defaults to `false`.",
          "title": "Include Missing Values"
        },
        "include": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A list of terms to include. Can be used with or without `include_is_regex`.",
          "title": "Include"
        },
        "exclude": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A list of terms to exclude. Can be used with or without `exclude_is_regex`.",
          "title": "Exclude"
        },
        "include_is_regex": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, treat the values in the `include` list as regular expressions. Defaults to `false`.",
          "title": "Include Is Regex"
        },
        "exclude_is_regex": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, treat the values in the `exclude` list as regular expressions. Defaults to `false`.",
          "title": "Exclude Is Regex"
        },
        "fields": {
          "description": "List of field names for multi-field aggregation. Requires at least 2 fields.",
          "items": {
            "type": "string"
          },
          "minItems": 2,
          "title": "Fields",
          "type": "array"
        }
      },
      "required": [
        "fields"
      ],
      "title": "DatatableLensMultiTermsDimension",
      "type": "object"
    },
    "DatatableLensOtherAggregatedMetric": {
      "additionalProperties": false,
      "description": "Datatable min/max/median/average metric with appearance options.",
      "properties": {
        "appearance": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableMetricAppearance"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Presentation options for this metric (width, alignment, summary row, etc.)."
        },
        "color": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableMetricColor"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Color display mode and optional range mapping for this metric."
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the metric. If not provided, a label may be inferred from the type and field.",
          "title": "Label"
        },
        "format": {
          "anyOf": [
            {
              "$ref": "#/$defs/LensMetricFormatTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The format of the metric."
        },
        "filter": {
          "anyOf": [
            {
              "$ref": "#/$defs/LegacyQueryTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A KQL filter applied before determining the metric value."
        },
        "aggregation": {
          "description": "The aggregation type for the metric (e.g., 'min', 'max', 'median', 'average', 'standard_deviation').",
          "enum": [
            "min",
            "max",
            "median",
            "average",
            "standard_deviation"
          ],
          "title": "Aggregation",
          "type": "string"
        },
        "field": {
          "title": "Field",
          "type": "string"
        }
      },
      "required": [
        "aggregation",
        "field"
      ],
      "title": "DatatableLensOtherAggregatedMetric",
      "type": "object"
    },
    "DatatableLensPercentileAggregatedMetric": {
      "additionalProperties": false,
      "description": "Datatable percentile metric with appearance options.",
      "properties": {
        "appearance": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableMetricAppearance"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Presentation options for this metric (width, alignment, summary row, etc.)."
        },
        "color": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableMetricColor"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Color display mode and optional range mapping for this metric."
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the metric. If not provided, a label may be inferred from the type and field.",
          "title": "Label"
        },
        "format": {
          "anyOf": [
            {
              "$ref": "#/$defs/LensMetricFormatTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The format of the metric."
        },
        "filter": {
          "anyOf": [
            {
              "$ref": "#/$defs/LegacyQueryTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A KQL filter applied before determining the metric value."
        },
        "aggregation": {
          "const": "percentile",
          "default": "percentile",
          "title": "Aggregation",
          "type": "string"
        },
        "field": {
          "title": "Field",
          "type": "string"
        },
        "percentile": {
          "title": "Percentile",
          "type": "integer"
        }
      },
      "required": [
        "field",
        "percentile"
      ],
      "title": "DatatableLensPercentileAggregatedMetric",
      "type": "object"
    },
    "DatatableLensPercentileRankAggregatedMetric": {
      "additionalProperties": false,
      "description": "Datatable percentile-rank metric with appearance options.",
      "properties": {
        "appearance": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableMetricAppearance"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Presentation options for this metric (width, alignment, summary row, etc.)."
        },
        "color": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableMetricColor"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Color display mode and optional range mapping for this metric."
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the metric. If not provided, a label may be inferred from the type and field.",
          "title": "Label"
        },
        "format": {
          "anyOf": [
            {
              "$ref": "#/$defs/LensMetricFormatTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The format of the metric."
        },
        "filter": {
          "anyOf": [
            {
              "$ref": "#/$defs/LegacyQueryTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A KQL filter applied before determining the metric value."
        },
        "aggregation": {
          "const": "percentile_rank",
          "default": "percentile_rank",
          "title": "Aggregation",
          "type": "string"
        },
        "field": {
          "title": "Field",
          "type": "string"
        },
        "rank": {
          "title": "Rank",
          "type": "integer"
        }
      },
      "required": [
        "field",
        "rank"
      ],
      "title": "DatatableLensPercentileRankAggregatedMetric",
      "type": "object"
    },
    "DatatableLensSumAggregatedMetric": {
      "additionalProperties": false,
      "description": "Datatable sum metric with appearance options.",
      "properties": {
        "appearance": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableMetricAppearance"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Presentation options for this metric (width, alignment, summary row, etc.)."
        },
        "color": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableMetricColor"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Color display mode and optional range mapping for this metric."
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the metric. If not provided, a label may be inferred from the type and field.",
          "title": "Label"
        },
        "format": {
          "anyOf": [
            {
              "$ref": "#/$defs/LensMetricFormatTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The format of the metric."
        },
        "filter": {
          "anyOf": [
            {
              "$ref": "#/$defs/LegacyQueryTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A KQL filter applied before determining the metric value."
        },
        "aggregation": {
          "const": "sum",
          "default": "sum",
          "title": "Aggregation",
          "type": "string"
        },
        "field": {
          "title": "Field",
          "type": "string"
        },
        "exclude_zeros": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Whether to exclude zero values from the sum. Kibana defaults to true if not specified.",
          "title": "Exclude Zeros"
        }
      },
      "required": [
        "field"
      ],
      "title": "DatatableLensSumAggregatedMetric",
      "type": "object"
    },
    "DatatableLensTermsBreakdown": {
      "additionalProperties": false,
      "description": "Datatable top-values breakdown with appearance options and collapse support.",
      "properties": {
        "appearance": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableColumnAppearance"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Presentation options for this dimension."
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the dimension. If not provided, a label may be inferred from the field and type.",
          "title": "Label"
        },
        "type": {
          "const": "values",
          "default": "values",
          "title": "Type",
          "type": "string"
        },
        "size": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The number of top terms to display.",
          "title": "Size"
        },
        "sort": {
          "anyOf": [
            {
              "$ref": "#/$defs/Sort"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The sort configuration for the terms."
        },
        "show_other_bucket": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, show a bucket for terms not included in the top size. Defaults to `true`.",
          "title": "Show Other Bucket"
        },
        "include_missing_values": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, show a bucket for documents with a missing value for the field. Defaults to `false`.",
          "title": "Include Missing Values"
        },
        "include": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A list of terms to include. Can be used with or without `include_is_regex`.",
          "title": "Include"
        },
        "exclude": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A list of terms to exclude. Can be used with or without `exclude_is_regex`.",
          "title": "Exclude"
        },
        "include_is_regex": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, treat the values in the `include` list as regular expressions. Defaults to `false`.",
          "title": "Include Is Regex"
        },
        "exclude_is_regex": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, treat the values in the `exclude` list as regular expressions. Defaults to `false`.",
          "title": "Exclude Is Regex"
        },
        "field": {
          "description": "The name of the field in the data view that this dimension is based on.",
          "title": "Field",
          "type": "string"
        },
        "collapse": {
          "anyOf": [
            {
              "$ref": "#/$defs/CollapseAggregationEnum"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Aggregate all breakdown values into a single bucket using this function (sum, avg, min, max)."
        }
      },
      "required": [
        "field"
      ],
      "title": "DatatableLensTermsBreakdown",
      "type": "object"
    },
    "DatatableLensTermsDimension": {
      "additionalProperties": false,
      "description": "Datatable top-values dimension with appearance options.",
      "properties": {
        "appearance": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableColumnAppearance"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Presentation options for this dimension."
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the dimension. If not provided, a label may be inferred from the field and type.",
          "title": "Label"
        },
        "type": {
          "const": "values",
          "default": "values",
          "title": "Type",
          "type": "string"
        },
        "size": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The number of top terms to display.",
          "title": "Size"
        },
        "sort": {
          "anyOf": [
            {
              "$ref": "#/$defs/Sort"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The sort configuration for the terms."
        },
        "show_other_bucket": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, show a bucket for terms not included in the top size. Defaults to `true`.",
          "title": "Show Other Bucket"
        },
        "include_missing_values": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, show a bucket for documents with a missing value for the field. Defaults to `false`.",
          "title": "Include Missing Values"
        },
        "include": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A list of terms to include. Can be used with or without `include_is_regex`.",
          "title": "Include"
        },
        "exclude": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A list of terms to exclude. Can be used with or without `exclude_is_regex`.",
          "title": "Exclude"
        },
        "include_is_regex": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, treat the values in the `include` list as regular expressions. Defaults to `false`.",
          "title": "Include Is Regex"
        },
        "exclude_is_regex": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, treat the values in the `exclude` list as regular expressions. Defaults to `false`.",
          "title": "Exclude Is Regex"
        },
        "field": {
          "description": "The name of the field in the data view that this dimension is based on.",
          "title": "Field",
          "type": "string"
        }
      },
      "required": [
        "field"
      ],
      "title": "DatatableLensTermsDimension",
      "type": "object"
    },
    "DatatableMetricAppearance": {
      "additionalProperties": false,
      "description": "Appearance options specific to datatable metric columns.",
      "properties": {
        "width": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Column width in pixels.",
          "title": "Width"
        },
        "hidden": {
          "default": false,
          "description": "Whether to hide this column.",
          "title": "Hidden",
          "type": "boolean"
        },
        "one_click_filter": {
          "default": false,
          "description": "Enable one-click filtering for this column.",
          "title": "One Click Filter",
          "type": "boolean"
        },
        "alignment": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableAlignmentEnum"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Text alignment for the column."
        },
        "summary_row": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableSummaryRowEnum"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Summary function to display at the bottom of the metric column."
        },
        "summary_label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Custom label for the summary row.",
          "title": "Summary Label"
        }
      },
      "title": "DatatableMetricAppearance",
      "type": "object"
    },
    "DatatableMetricColor": {
      "additionalProperties": false,
      "description": "Color settings for datatable metric appearance.",
      "properties": {
        "apply_to": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableColorModeEnum"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "How to apply colors to the metric column."
        },
        "range_type": {
          "default": "number",
          "description": "How threshold values are interpreted by Kibana.",
          "enum": [
            "number",
            "percent"
          ],
          "title": "Range Type",
          "type": "string"
        },
        "range_min": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": 0,
          "description": "Optional lower bound for the palette domain.",
          "title": "Range Min"
        },
        "range_max": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional upper bound for the palette domain.",
          "title": "Range Max"
        },
        "thresholds": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/ColorThreshold"
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Ordered threshold bands used to build datatable palettes.",
          "title": "Thresholds"
        }
      },
      "title": "DatatableMetricColor",
      "type": "object"
    },
    "DatatablePagingConfig": {
      "additionalProperties": false,
      "description": "Pagination configuration for datatable.",
      "properties": {
        "enabled": {
          "default": true,
          "description": "Whether pagination is enabled.",
          "title": "Enabled",
          "type": "boolean"
        },
        "page_size": {
          "default": 10,
          "description": "Number of rows per page.",
          "title": "Page Size",
          "type": "integer"
        }
      },
      "title": "DatatablePagingConfig",
      "type": "object"
    },
    "DatatableRowHeightEnum": {
      "description": "Row height options for datatable.",
      "enum": [
        "auto",
        "single",
        "custom"
      ],
      "title": "DatatableRowHeightEnum",
      "type": "string"
    },
    "DatatableSortingConfig": {
      "additionalProperties": false,
      "description": "Sorting configuration for datatable.",
      "properties": {
        "column_id": {
          "description": "The ID of the column to sort by.",
          "title": "Column Id",
          "type": "string"
        },
        "direction": {
          "default": "asc",
          "description": "Sort direction.",
          "enum": [
            "asc",
            "desc"
          ],
          "title": "Direction",
          "type": "string"
        }
      },
      "required": [
        "column_id"
      ],
      "title": "DatatableSortingConfig",
      "type": "object"
    },
    "DatatableSummaryRowEnum": {
      "description": "Summary row options for datatable columns.",
      "enum": [
        "none",
        "sum",
        "avg",
        "count",
        "min",
        "max"
      ],
      "title": "DatatableSummaryRowEnum",
      "type": "string"
    },
    "KqlQuery": {
      "additionalProperties": false,
      "description": "Represents a KQL (Kibana Query Language) query configuration.\n\nKQL is the default query language in Kibana and provides a simplified syntax for filtering data.",
      "properties": {
        "kql": {
          "description": "The Kibana Query Language (KQL) query string to apply.",
          "title": "Kql",
          "type": "string"
        }
      },
      "required": [
        "kql"
      ],
      "title": "KqlQuery",
      "type": "object"
    },
    "LegacyQueryTypes": {
      "oneOf": [
        {
          "$ref": "#/$defs/KqlQuery"
        },
        {
          "$ref": "#/$defs/LuceneQuery"
        }
      ]
    },
    "LensAggregatedMetricTypes": {
      "anyOf": [
        {
          "$ref": "#/$defs/LensOtherAggregatedMetric"
        },
        {
          "$ref": "#/$defs/LensLastValueAggregatedMetric"
        },
        {
          "$ref": "#/$defs/LensCountAggregatedMetric"
        },
        {
          "$ref": "#/$defs/LensSumAggregatedMetric"
        },
        {
          "$ref": "#/$defs/LensPercentileRankAggregatedMetric"
        },
        {
          "$ref": "#/$defs/LensPercentileAggregatedMetric"
        }
      ]
    },
    "LensBreakdownTypes": {
      "anyOf": [
        {
          "$ref": "#/$defs/LensTermsBreakdown"
        },
        {
          "$ref": "#/$defs/LensMultiTermsBreakdown"
        },
        {
          "$ref": "#/$defs/LensDateHistogramBreakdown"
        },
        {
          "$ref": "#/$defs/LensFiltersBreakdown"
        },
        {
          "$ref": "#/$defs/LensIntervalsBreakdown"
        }
      ]
    },
    "LensCountAggregatedMetric": {
      "additionalProperties": false,
      "description": "Represents a count metric configuration within a Lens chart.\n\nCount metrics are used to count the number of documents in a data view.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the metric. If not provided, a label may be inferred from the type and field.",
          "title": "Label"
        },
        "format": {
          "anyOf": [
            {
              "$ref": "#/$defs/LensMetricFormatTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The format of the metric."
        },
        "filter": {
          "anyOf": [
            {
              "$ref": "#/$defs/LegacyQueryTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A KQL filter applied before determining the metric value."
        },
        "aggregation": {
          "default": "count",
          "enum": [
            "count",
            "unique_count"
          ],
          "title": "Aggregation",
          "type": "string"
        },
        "field": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The field to count. If not provided, the count will be of all documents in the data view.",
          "title": "Field"
        },
        "exclude_zeros": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Whether to exclude zero values from the count. Kibana defaults to true if not specified.",
          "title": "Exclude Zeros"
        }
      },
      "title": "LensCountAggregatedMetric",
      "type": "object"
    },
    "LensCustomMetricFormat": {
      "additionalProperties": false,
      "description": "Custom format configuration for metrics using numeral.js patterns.\n\nUse this for complete control over numeric formatting with numeral.js syntax.",
      "properties": {
        "type": {
          "const": "custom",
          "default": "custom",
          "description": "Format type identifier. Must be 'custom' for custom formats.",
          "title": "Type",
          "type": "string"
        },
        "decimals": {
          "anyOf": [
            {
              "minimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The number of decimal places to display. If not specified, defaults to 0.",
          "title": "Decimals"
        },
        "pattern": {
          "description": "numeral.js format pattern (e.g., \"0,0.00\" for comma-separated numbers with 2 decimals).",
          "title": "Pattern",
          "type": "string"
        },
        "suffix": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional suffix to display after the formatted number (e.g., \" requests\", \" users\").",
          "title": "Suffix"
        },
        "compact": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Whether to use compact notation (e.g., 1.2K instead of 1200). Defaults to Kibana's behavior.",
          "title": "Compact"
        }
      },
      "required": [
        "pattern"
      ],
      "title": "LensCustomMetricFormat",
      "type": "object"
    },
    "LensDataMetricTypes": {
      "anyOf": [
        {
          "$ref": "#/$defs/LensFormulaMetric"
        },
        {
          "$ref": "#/$defs/LensAggregatedMetricTypes"
        }
      ]
    },
    "LensDatatableBreakdownTypes": {
      "anyOf": [
        {
          "$ref": "#/$defs/DatatableLensTermsBreakdown"
        },
        {
          "$ref": "#/$defs/DatatableLensMultiTermsBreakdown"
        },
        {
          "$ref": "#/$defs/DatatableLensDateHistogramBreakdown"
        },
        {
          "$ref": "#/$defs/DatatableLensFiltersBreakdown"
        },
        {
          "$ref": "#/$defs/DatatableLensIntervalsBreakdown"
        }
      ]
    },
    "LensDatatableDimensionTypes": {
      "anyOf": [
        {
          "$ref": "#/$defs/DatatableLensTermsDimension"
        },
        {
          "$ref": "#/$defs/DatatableLensMultiTermsDimension"
        },
        {
          "$ref": "#/$defs/DatatableLensDateHistogramDimension"
        },
        {
          "$ref": "#/$defs/DatatableLensFiltersDimension"
        },
        {
          "$ref": "#/$defs/DatatableLensIntervalsDimension"
        }
      ]
    },
    "LensDatatableMetricTypes": {
      "anyOf": [
        {
          "$ref": "#/$defs/DatatableLensFormulaMetric"
        },
        {
          "$ref": "#/$defs/DatatableLensCountAggregatedMetric"
        },
        {
          "$ref": "#/$defs/DatatableLensSumAggregatedMetric"
        },
        {
          "$ref": "#/$defs/DatatableLensOtherAggregatedMetric"
        },
        {
          "$ref": "#/$defs/DatatableLensLastValueAggregatedMetric"
        },
        {
          "$ref": "#/$defs/DatatableLensPercentileRankAggregatedMetric"
        },
        {
          "$ref": "#/$defs/DatatableLensPercentileAggregatedMetric"
        }
      ]
    },
    "LensDateHistogramBreakdown": {
      "additionalProperties": false,
      "description": "Date histogram breakdown with optional collapse aggregation.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the dimension. If not provided, a label may be inferred from the field and type.",
          "title": "Label"
        },
        "type": {
          "const": "date_histogram",
          "default": "date_histogram",
          "title": "Type",
          "type": "string"
        },
        "field": {
          "description": "The name of the field in the data view that this dimension is based on.",
          "title": "Field",
          "type": "string"
        },
        "minimum_interval": {
          "anyOf": [
            {
              "$ref": "#/$defs/LensDateMathMinimumInterval"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The minimum interval using Elasticsearch date math format (e.g. `1m`, `1h`). Defaults to `auto`."
        },
        "partial_intervals": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, show partial intervals. Kibana defaults to `true` if not specified.",
          "title": "Partial Intervals"
        },
        "collapse": {
          "anyOf": [
            {
              "$ref": "#/$defs/CollapseAggregationEnum"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Aggregate all breakdown values into a single bucket using this function (sum, avg, min, max)."
        }
      },
      "required": [
        "field"
      ],
      "title": "LensDateHistogramBreakdown",
      "type": "object"
    },
    "LensDateHistogramDimension": {
      "additionalProperties": false,
      "description": "Represents a histogram dimension configuration within a Lens chart.\n\nDate histogram dimensions are used for aggregating data into buckets based on numeric ranges.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the dimension. If not provided, a label may be inferred from the field and type.",
          "title": "Label"
        },
        "type": {
          "const": "date_histogram",
          "default": "date_histogram",
          "title": "Type",
          "type": "string"
        },
        "field": {
          "description": "The name of the field in the data view that this dimension is based on.",
          "title": "Field",
          "type": "string"
        },
        "minimum_interval": {
          "anyOf": [
            {
              "$ref": "#/$defs/LensDateMathMinimumInterval"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The minimum interval using Elasticsearch date math format (e.g. `1m`, `1h`). Defaults to `auto`."
        },
        "partial_intervals": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, show partial intervals. Kibana defaults to `true` if not specified.",
          "title": "Partial Intervals"
        }
      },
      "required": [
        "field"
      ],
      "title": "LensDateHistogramDimension",
      "type": "object"
    },
    "LensDateMathMinimumInterval": {
      "anyOf": [
        {
          "const": "auto",
          "type": "string"
        },
        {
          "pattern": "^[1-9][0-9]*(ms|s|m|h|d|w|M|q|y)$",
          "type": "string"
        }
      ]
    },
    "LensDimensionTypes": {
      "anyOf": [
        {
          "$ref": "#/$defs/LensTermsDimension"
        },
        {
          "$ref": "#/$defs/LensMultiTermsDimension"
        },
        {
          "$ref": "#/$defs/LensDateHistogramDimension"
        },
        {
          "$ref": "#/$defs/LensFiltersDimension"
        },
        {
          "$ref": "#/$defs/LensIntervalsDimension"
        }
      ]
    },
    "LensFiltersBreakdown": {
      "additionalProperties": false,
      "description": "Filters breakdown with optional collapse aggregation.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the dimension. If not provided, a label may be inferred from the field and type.",
          "title": "Label"
        },
        "type": {
          "const": "filters",
          "default": "filters",
          "title": "Type",
          "type": "string"
        },
        "filters": {
          "description": "The filters to use for the dimension.",
          "items": {
            "$ref": "#/$defs/LensFiltersDimensionFilter"
          },
          "title": "Filters",
          "type": "array"
        },
        "collapse": {
          "anyOf": [
            {
              "$ref": "#/$defs/CollapseAggregationEnum"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Aggregate all breakdown values into a single bucket using this function (sum, avg, min, max)."
        }
      },
      "required": [
        "filters"
      ],
      "title": "LensFiltersBreakdown",
      "type": "object"
    },
    "LensFiltersDimension": {
      "additionalProperties": false,
      "description": "Represents a filters dimension configuration within a Lens chart.\n\nFilters dimensions are used for filtering data based on a field.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the dimension. If not provided, a label may be inferred from the field and type.",
          "title": "Label"
        },
        "type": {
          "const": "filters",
          "default": "filters",
          "title": "Type",
          "type": "string"
        },
        "filters": {
          "description": "The filters to use for the dimension.",
          "items": {
            "$ref": "#/$defs/LensFiltersDimensionFilter"
          },
          "title": "Filters",
          "type": "array"
        }
      },
      "required": [
        "filters"
      ],
      "title": "LensFiltersDimension",
      "type": "object"
    },
    "LensFiltersDimensionFilter": {
      "additionalProperties": false,
      "description": "A filter for a filters dimension.",
      "properties": {
        "query": {
          "$ref": "#/$defs/LegacyQueryTypes",
          "description": "The query to use for the dimension."
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the filter. If not provided, the query will be used as the label.",
          "title": "Label"
        }
      },
      "required": [
        "query"
      ],
      "title": "LensFiltersDimensionFilter",
      "type": "object"
    },
    "LensFormulaMetric": {
      "additionalProperties": false,
      "description": "Represents a formula metric configuration within a Lens chart.\n\nFormula metrics allow for custom calculations using Kibana's formula syntax.\nThe formula string is passed directly to Kibana, which handles parsing and\nAST generation internally.\n\nExample formulas:\n- Simple arithmetic: \"count() / 100\"\n- Field aggregations: \"(max(response.time) - min(response.time)) / average(response.time)\"\n- With filters: \"count(kql='status:error') / count() * 100\"",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the metric. If not provided, a label may be inferred from the type and field.",
          "title": "Label"
        },
        "format": {
          "anyOf": [
            {
              "$ref": "#/$defs/LensMetricFormatTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The format of the metric."
        },
        "filter": {
          "anyOf": [
            {
              "$ref": "#/$defs/LegacyQueryTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A KQL filter applied before determining the metric value."
        },
        "formula": {
          "description": "The formula string to be evaluated for this metric.",
          "title": "Formula",
          "type": "string"
        }
      },
      "required": [
        "formula"
      ],
      "title": "LensFormulaMetric",
      "type": "object"
    },
    "LensIntervalsBreakdown": {
      "additionalProperties": false,
      "description": "Intervals breakdown with optional collapse aggregation.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the dimension. If not provided, a label may be inferred from the field and type.",
          "title": "Label"
        },
        "type": {
          "const": "intervals",
          "default": "intervals",
          "title": "Type",
          "type": "string"
        },
        "field": {
          "description": "The name of the field in the data view that this dimension is based on.",
          "title": "Field",
          "type": "string"
        },
        "intervals": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/LensIntervalsDimensionInterval"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The intervals to use for the dimension. If not provided, intervals will be automatically picked.",
          "title": "Intervals"
        },
        "granularity": {
          "anyOf": [
            {
              "maximum": 7,
              "minimum": 1,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Interval granularity divides the field into evenly spaced intervals based on the minimum and maximum values for the field.\nKibana defaults to 4 if not specified.",
          "title": "Granularity"
        },
        "include_empty_intervals": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, include empty histogram buckets. Defaults to `true`.",
          "title": "Include Empty Intervals"
        },
        "collapse": {
          "anyOf": [
            {
              "$ref": "#/$defs/CollapseAggregationEnum"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Aggregate all breakdown values into a single bucket using this function (sum, avg, min, max)."
        }
      },
      "required": [
        "field"
      ],
      "title": "LensIntervalsBreakdown",
      "type": "object"
    },
    "LensIntervalsDimension": {
      "additionalProperties": false,
      "description": "Represents an intervals dimension configuration within a Lens chart.\n\nIntervals dimensions are used for aggregating data based on numeric ranges.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the dimension. If not provided, a label may be inferred from the field and type.",
          "title": "Label"
        },
        "type": {
          "const": "intervals",
          "default": "intervals",
          "title": "Type",
          "type": "string"
        },
        "field": {
          "description": "The name of the field in the data view that this dimension is based on.",
          "title": "Field",
          "type": "string"
        },
        "intervals": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/LensIntervalsDimensionInterval"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The intervals to use for the dimension. If not provided, intervals will be automatically picked.",
          "title": "Intervals"
        },
        "granularity": {
          "anyOf": [
            {
              "maximum": 7,
              "minimum": 1,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Interval granularity divides the field into evenly spaced intervals based on the minimum and maximum values for the field.\nKibana defaults to 4 if not specified.",
          "title": "Granularity"
        },
        "include_empty_intervals": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, include empty histogram buckets. Defaults to `true`.",
          "title": "Include Empty Intervals"
        }
      },
      "required": [
        "field"
      ],
      "title": "LensIntervalsDimension",
      "type": "object"
    },
    "LensIntervalsDimensionInterval": {
      "additionalProperties": false,
      "description": "A single interval for an intervals dimension.",
      "properties": {
        "from": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The start of the interval.",
          "title": "From"
        },
        "to": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The end of the interval.",
          "title": "To"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The label for the interval.",
          "title": "Label"
        }
      },
      "title": "LensIntervalsDimensionInterval",
      "type": "object"
    },
    "LensLastValueAggregatedMetric": {
      "additionalProperties": false,
      "description": "Represents a last value metric configuration within a Lens chart.\n\nLast value metrics are used to retrieve the most recent value of a field based on a specified sort order.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the metric. If not provided, a label may be inferred from the type and field.",
          "title": "Label"
        },
        "format": {
          "anyOf": [
            {
              "$ref": "#/$defs/LensMetricFormatTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The format of the metric."
        },
        "filter": {
          "anyOf": [
            {
              "$ref": "#/$defs/LegacyQueryTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A KQL filter applied before determining the metric value."
        },
        "aggregation": {
          "const": "last_value",
          "default": "last_value",
          "title": "Aggregation",
          "type": "string"
        },
        "field": {
          "title": "Field",
          "type": "string"
        },
        "date_field": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The field used to determine the 'last' value.",
          "title": "Date Field"
        }
      },
      "required": [
        "field"
      ],
      "title": "LensLastValueAggregatedMetric",
      "type": "object"
    },
    "LensMetricFormat": {
      "additionalProperties": false,
      "description": "Standard format configuration for displaying metric values.\n\nSupports common numeric formats with optional suffix and compact notation.",
      "properties": {
        "type": {
          "description": "The format type for the metric value.\n\nAvailable formats:\n- **number**: Plain numeric value with optional decimal places\n- **bytes**: Byte size formatting (B, KB, MB, GB, TB)\n- **bits**: Bit size formatting (b, Kb, Mb, Gb, Tb)\n- **percent**: Percentage formatting with % symbol\n- **duration**: Time duration formatting (ms, s, m, h, d)",
          "enum": [
            "number",
            "bytes",
            "bits",
            "percent",
            "duration"
          ],
          "title": "Type",
          "type": "string"
        },
        "decimals": {
          "anyOf": [
            {
              "minimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The number of decimal places to display. If not specified, defaults to 2 for number/bytes/percent, 0 for bits/duration.",
          "title": "Decimals"
        },
        "suffix": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional suffix to display after the formatted number (e.g., \" requests\", \" users\").",
          "title": "Suffix"
        },
        "compact": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Whether to use compact notation (e.g., 1.2K instead of 1200). Defaults to Kibana's behavior.",
          "title": "Compact"
        }
      },
      "required": [
        "type"
      ],
      "title": "LensMetricFormat",
      "type": "object"
    },
    "LensMetricFormatTypes": {
      "anyOf": [
        {
          "$ref": "#/$defs/LensMetricFormat"
        },
        {
          "$ref": "#/$defs/LensCustomMetricFormat"
        }
      ]
    },
    "LensMultiTermsBreakdown": {
      "additionalProperties": false,
      "description": "Multi-field top-values breakdown with optional collapse aggregation.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the dimension. If not provided, a label may be inferred from the field and type.",
          "title": "Label"
        },
        "type": {
          "const": "values",
          "default": "values",
          "title": "Type",
          "type": "string"
        },
        "size": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The number of top terms to display.",
          "title": "Size"
        },
        "sort": {
          "anyOf": [
            {
              "$ref": "#/$defs/Sort"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The sort configuration for the terms."
        },
        "show_other_bucket": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, show a bucket for terms not included in the top size. Defaults to `true`.",
          "title": "Show Other Bucket"
        },
        "include_missing_values": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, show a bucket for documents with a missing value for the field. Defaults to `false`.",
          "title": "Include Missing Values"
        },
        "include": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A list of terms to include. Can be used with or without `include_is_regex`.",
          "title": "Include"
        },
        "exclude": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A list of terms to exclude. Can be used with or without `exclude_is_regex`.",
          "title": "Exclude"
        },
        "include_is_regex": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, treat the values in the `include` list as regular expressions. Defaults to `false`.",
          "title": "Include Is Regex"
        },
        "exclude_is_regex": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, treat the values in the `exclude` list as regular expressions. Defaults to `false`.",
          "title": "Exclude Is Regex"
        },
        "fields": {
          "description": "List of field names for multi-field aggregation. Requires at least 2 fields.",
          "items": {
            "type": "string"
          },
          "minItems": 2,
          "title": "Fields",
          "type": "array"
        },
        "collapse": {
          "anyOf": [
            {
              "$ref": "#/$defs/CollapseAggregationEnum"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Aggregate all breakdown values into a single bucket using this function (sum, avg, min, max)."
        }
      },
      "required": [
        "fields"
      ],
      "title": "LensMultiTermsBreakdown",
      "type": "object"
    },
    "LensMultiTermsDimension": {
      "additionalProperties": false,
      "description": "Represents a multi-field top values dimension configuration within a Lens chart.\n\nMulti-terms dimensions are used for aggregating data based on unique combinations\nof values across multiple fields.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the dimension. If not provided, a label may be inferred from the field and type.",
          "title": "Label"
        },
        "type": {
          "const": "values",
          "default": "values",
          "title": "Type",
          "type": "string"
        },
        "size": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The number of top terms to display.",
          "title": "Size"
        },
        "sort": {
          "anyOf": [
            {
              "$ref": "#/$defs/Sort"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The sort configuration for the terms."
        },
        "show_other_bucket": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, show a bucket for terms not included in the top size. Defaults to `true`.",
          "title": "Show Other Bucket"
        },
        "include_missing_values": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, show a bucket for documents with a missing value for the field. Defaults to `false`.",
          "title": "Include Missing Values"
        },
        "include": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A list of terms to include. Can be used with or without `include_is_regex`.",
          "title": "Include"
        },
        "exclude": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A list of terms to exclude. Can be used with or without `exclude_is_regex`.",
          "title": "Exclude"
        },
        "include_is_regex": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, treat the values in the `include` list as regular expressions. Defaults to `false`.",
          "title": "Include Is Regex"
        },
        "exclude_is_regex": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, treat the values in the `exclude` list as regular expressions. Defaults to `false`.",
          "title": "Exclude Is Regex"
        },
        "fields": {
          "description": "List of field names for multi-field aggregation. Requires at least 2 fields.",
          "items": {
            "type": "string"
          },
          "minItems": 2,
          "title": "Fields",
          "type": "array"
        }
      },
      "required": [
        "fields"
      ],
      "title": "LensMultiTermsDimension",
      "type": "object"
    },
    "LensOtherAggregatedMetric": {
      "additionalProperties": false,
      "description": "Represents various aggregated metric configurations within a Lens chart.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the metric. If not provided, a label may be inferred from the type and field.",
          "title": "Label"
        },
        "format": {
          "anyOf": [
            {
              "$ref": "#/$defs/LensMetricFormatTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The format of the metric."
        },
        "filter": {
          "anyOf": [
            {
              "$ref": "#/$defs/LegacyQueryTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A KQL filter applied before determining the metric value."
        },
        "aggregation": {
          "description": "The aggregation type for the metric (e.g., 'min', 'max', 'median', 'average', 'standard_deviation').",
          "enum": [
            "min",
            "max",
            "median",
            "average",
            "standard_deviation"
          ],
          "title": "Aggregation",
          "type": "string"
        },
        "field": {
          "title": "Field",
          "type": "string"
        }
      },
      "required": [
        "aggregation",
        "field"
      ],
      "title": "LensOtherAggregatedMetric",
      "type": "object"
    },
    "LensPercentileAggregatedMetric": {
      "additionalProperties": false,
      "description": "Represents a percentile metric configuration within a Lens chart.\n\nPercentile metrics are used to determine the value at a specific percentile in a data set.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the metric. If not provided, a label may be inferred from the type and field.",
          "title": "Label"
        },
        "format": {
          "anyOf": [
            {
              "$ref": "#/$defs/LensMetricFormatTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The format of the metric."
        },
        "filter": {
          "anyOf": [
            {
              "$ref": "#/$defs/LegacyQueryTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A KQL filter applied before determining the metric value."
        },
        "aggregation": {
          "const": "percentile",
          "default": "percentile",
          "title": "Aggregation",
          "type": "string"
        },
        "field": {
          "title": "Field",
          "type": "string"
        },
        "percentile": {
          "title": "Percentile",
          "type": "integer"
        }
      },
      "required": [
        "field",
        "percentile"
      ],
      "title": "LensPercentileAggregatedMetric",
      "type": "object"
    },
    "LensPercentileRankAggregatedMetric": {
      "additionalProperties": false,
      "description": "Represents a percentile rank metric configuration within a Lens chart.\n\nPercentile rank metrics are used to determine the rank of a value in a data set.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the metric. If not provided, a label may be inferred from the type and field.",
          "title": "Label"
        },
        "format": {
          "anyOf": [
            {
              "$ref": "#/$defs/LensMetricFormatTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The format of the metric."
        },
        "filter": {
          "anyOf": [
            {
              "$ref": "#/$defs/LegacyQueryTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A KQL filter applied before determining the metric value."
        },
        "aggregation": {
          "const": "percentile_rank",
          "default": "percentile_rank",
          "title": "Aggregation",
          "type": "string"
        },
        "field": {
          "title": "Field",
          "type": "string"
        },
        "rank": {
          "title": "Rank",
          "type": "integer"
        }
      },
      "required": [
        "field",
        "rank"
      ],
      "title": "LensPercentileRankAggregatedMetric",
      "type": "object"
    },
    "LensSumAggregatedMetric": {
      "additionalProperties": false,
      "description": "Represents a sum metric configuration within a Lens chart.\n\nSum metrics are used to sum the values of a field.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the metric. If not provided, a label may be inferred from the type and field.",
          "title": "Label"
        },
        "format": {
          "anyOf": [
            {
              "$ref": "#/$defs/LensMetricFormatTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The format of the metric."
        },
        "filter": {
          "anyOf": [
            {
              "$ref": "#/$defs/LegacyQueryTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A KQL filter applied before determining the metric value."
        },
        "aggregation": {
          "const": "sum",
          "default": "sum",
          "title": "Aggregation",
          "type": "string"
        },
        "field": {
          "title": "Field",
          "type": "string"
        },
        "exclude_zeros": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Whether to exclude zero values from the sum. Kibana defaults to true if not specified.",
          "title": "Exclude Zeros"
        }
      },
      "required": [
        "field"
      ],
      "title": "LensSumAggregatedMetric",
      "type": "object"
    },
    "LensTermsBreakdown": {
      "additionalProperties": false,
      "description": "Top-values breakdown with optional collapse aggregation.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the dimension. If not provided, a label may be inferred from the field and type.",
          "title": "Label"
        },
        "type": {
          "const": "values",
          "default": "values",
          "title": "Type",
          "type": "string"
        },
        "size": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The number of top terms to display.",
          "title": "Size"
        },
        "sort": {
          "anyOf": [
            {
              "$ref": "#/$defs/Sort"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The sort configuration for the terms."
        },
        "show_other_bucket": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, show a bucket for terms not included in the top size. Defaults to `true`.",
          "title": "Show Other Bucket"
        },
        "include_missing_values": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, show a bucket for documents with a missing value for the field. Defaults to `false`.",
          "title": "Include Missing Values"
        },
        "include": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A list of terms to include. Can be used with or without `include_is_regex`.",
          "title": "Include"
        },
        "exclude": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A list of terms to exclude. Can be used with or without `exclude_is_regex`.",
          "title": "Exclude"
        },
        "include_is_regex": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, treat the values in the `include` list as regular expressions. Defaults to `false`.",
          "title": "Include Is Regex"
        },
        "exclude_is_regex": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, treat the values in the `exclude` list as regular expressions. Defaults to `false`.",
          "title": "Exclude Is Regex"
        },
        "field": {
          "description": "The name of the field in the data view that this dimension is based on.",
          "title": "Field",
          "type": "string"
        },
        "collapse": {
          "anyOf": [
            {
              "$ref": "#/$defs/CollapseAggregationEnum"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Aggregate all breakdown values into a single bucket using this function (sum, avg, min, max)."
        }
      },
      "required": [
        "field"
      ],
      "title": "LensTermsBreakdown",
      "type": "object"
    },
    "LensTermsDimension": {
      "additionalProperties": false,
      "description": "Represents a single-field top values dimension configuration within a Lens chart.\n\nTerms dimensions are used for aggregating data based on unique values of a single field.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display label for the dimension. If not provided, a label may be inferred from the field and type.",
          "title": "Label"
        },
        "type": {
          "const": "values",
          "default": "values",
          "title": "Type",
          "type": "string"
        },
        "size": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The number of top terms to display.",
          "title": "Size"
        },
        "sort": {
          "anyOf": [
            {
              "$ref": "#/$defs/Sort"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The sort configuration for the terms."
        },
        "show_other_bucket": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, show a bucket for terms not included in the top size. Defaults to `true`.",
          "title": "Show Other Bucket"
        },
        "include_missing_values": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, show a bucket for documents with a missing value for the field. Defaults to `false`.",
          "title": "Include Missing Values"
        },
        "include": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A list of terms to include. Can be used with or without `include_is_regex`.",
          "title": "Include"
        },
        "exclude": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A list of terms to exclude. Can be used with or without `exclude_is_regex`.",
          "title": "Exclude"
        },
        "include_is_regex": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, treat the values in the `include` list as regular expressions. Defaults to `false`.",
          "title": "Include Is Regex"
        },
        "exclude_is_regex": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "If `true`, treat the values in the `exclude` list as regular expressions. Defaults to `false`.",
          "title": "Exclude Is Regex"
        },
        "field": {
          "description": "The name of the field in the data view that this dimension is based on.",
          "title": "Field",
          "type": "string"
        }
      },
      "required": [
        "field"
      ],
      "title": "LensTermsDimension",
      "type": "object"
    },
    "LuceneQuery": {
      "additionalProperties": false,
      "description": "Represents a Lucene query configuration.\n\nLucene provides a more powerful and flexible, but less friendly, syntax for querying data compared to KQL.",
      "properties": {
        "lucene": {
          "description": "The Lucene query string to apply.",
          "title": "Lucene",
          "type": "string"
        }
      },
      "required": [
        "lucene"
      ],
      "title": "LuceneQuery",
      "type": "object"
    },
    "Sort": {
      "additionalProperties": false,
      "description": "Represents a sort configuration in the Config schema.",
      "properties": {
        "by": {
          "description": "The field name to sort the data by.",
          "title": "By",
          "type": "string"
        },
        "direction": {
          "description": "The sort direction. Must be either 'asc' for ascending or 'desc' for descending.",
          "enum": [
            "asc",
            "desc"
          ],
          "title": "Direction",
          "type": "string"
        }
      },
      "required": [
        "by",
        "direction"
      ],
      "title": "Sort",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "description": "Represents a Datatable chart configuration within a Lens panel.\n\nDatatable charts display tabular data with customizable columns, sorting,\npagination, and formatting options.\n\nExamples:\n    Simple datatable with metrics and breakdowns:\n    ```yaml\n    lens:\n      type: datatable\n      data_view: \"metrics-*\"\n      metrics:\n        - id: \"service-count\"\n          field: \"service.name\"\n          aggregation: count\n      breakdowns:\n        - id: \"service-breakdown\"\n          type: values\n          field: \"service.name\"\n    ```\n\n    Datatable with sorting and pagination:\n    ```yaml\n    lens:\n      type: datatable\n      data_view: \"logs-*\"\n      metrics:\n        - id: \"error-count\"\n          aggregation: count\n          filter:\n            kql: \"log.level:error\"\n      breakdowns:\n        - id: \"service\"\n          type: values\n          field: \"service.name\"\n      sorting:\n        column_id: \"error-count\"\n        direction: desc\n      paging:\n        enabled: true\n        page_size: 25\n    ```",
  "properties": {
    "type": {
      "const": "datatable",
      "default": "datatable",
      "description": "The type of chart, which is 'datatable' for this visualization.",
      "title": "Type",
      "type": "string"
    },
    "appearance": {
      "anyOf": [
        {
          "$ref": "#/$defs/DatatableAppearance"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Appearance settings for the datatable."
    },
    "sorting": {
      "anyOf": [
        {
          "$ref": "#/$defs/DatatableSortingConfig"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional sorting configuration."
    },
    "paging": {
      "anyOf": [
        {
          "$ref": "#/$defs/DatatablePagingConfig"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional pagination configuration."
    },
    "id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "A unique identifier. If not provided, one will be generated automatically.",
      "title": "Id"
    },
    "data_view": {
      "description": "The data view that determines the data for the datatable chart.",
      "title": "Data View",
      "type": "string"
    },
    "metrics": {
      "description": "List of metrics to display as columns.",
      "items": {
        "anyOf": [
          {
            "$ref": "#/$defs/LensDatatableMetricTypes"
          },
          {
            "$ref": "#/$defs/LensDataMetricTypes"
          }
        ]
      },
      "title": "Metrics",
      "type": "array"
    },
    "breakdowns": {
      "description": "List of breakdowns to use as row groupings.",
      "items": {
        "anyOf": [
          {
            "$ref": "#/$defs/LensDatatableBreakdownTypes"
          },
          {
            "$ref": "#/$defs/LensBreakdownTypes"
          }
        ]
      },
      "title": "Breakdowns",
      "type": "array"
    },
    "metrics_split_by": {
      "anyOf": [
        {
          "items": {
            "anyOf": [
              {
                "$ref": "#/$defs/LensDatatableDimensionTypes"
              },
              {
                "$ref": "#/$defs/LensDimensionTypes"
              }
            ]
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional split-metrics-by dimensions (creates separate metric columns for each dimension value).",
      "title": "Metrics Split By"
    }
  },
  "required": [
    "data_view"
  ],
  "title": "LensDatatableChart",
  "type": "object"
}

validate_has_metrics_or_breakdowns

validate_has_metrics_or_breakdowns()

Validate that datatable has at least one metric or breakdown.

Kibana requires datatables to have either metrics or breakdowns (or both). An empty datatable with neither will render as a blank panel.

Column Appearance

Appearance options shared by datatable metric and dimension columns.

Attributes:

Name Type Description
width int | None

Column width in pixels.

hidden bool

Whether to hide this column.

one_click_filter bool

Enable one-click filtering for this column.

alignment DatatableAlignmentEnum | None

Text alignment for the column.

Show JSON schema:
{
  "$defs": {
    "DatatableAlignmentEnum": {
      "description": "Alignment options for datatable columns.",
      "enum": [
        "left",
        "right",
        "center"
      ],
      "title": "DatatableAlignmentEnum",
      "type": "string"
    }
  },
  "additionalProperties": false,
  "description": "Appearance options shared by datatable metric and dimension columns.",
  "properties": {
    "width": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Column width in pixels.",
      "title": "Width"
    },
    "hidden": {
      "default": false,
      "description": "Whether to hide this column.",
      "title": "Hidden",
      "type": "boolean"
    },
    "one_click_filter": {
      "default": false,
      "description": "Enable one-click filtering for this column.",
      "title": "One Click Filter",
      "type": "boolean"
    },
    "alignment": {
      "anyOf": [
        {
          "$ref": "#/$defs/DatatableAlignmentEnum"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Text alignment for the column."
    }
  },
  "title": "DatatableColumnAppearance",
  "type": "object"
}

Metric Column Configuration

Appearance options specific to datatable metric columns.

Attributes:

Name Type Description
summary_row DatatableSummaryRowEnum | None

Summary function to display at the bottom of the metric column.

summary_label str | None

Custom label for the summary row.

Show JSON schema:
{
  "$defs": {
    "DatatableAlignmentEnum": {
      "description": "Alignment options for datatable columns.",
      "enum": [
        "left",
        "right",
        "center"
      ],
      "title": "DatatableAlignmentEnum",
      "type": "string"
    },
    "DatatableSummaryRowEnum": {
      "description": "Summary row options for datatable columns.",
      "enum": [
        "none",
        "sum",
        "avg",
        "count",
        "min",
        "max"
      ],
      "title": "DatatableSummaryRowEnum",
      "type": "string"
    }
  },
  "additionalProperties": false,
  "description": "Appearance options specific to datatable metric columns.",
  "properties": {
    "width": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Column width in pixels.",
      "title": "Width"
    },
    "hidden": {
      "default": false,
      "description": "Whether to hide this column.",
      "title": "Hidden",
      "type": "boolean"
    },
    "one_click_filter": {
      "default": false,
      "description": "Enable one-click filtering for this column.",
      "title": "One Click Filter",
      "type": "boolean"
    },
    "alignment": {
      "anyOf": [
        {
          "$ref": "#/$defs/DatatableAlignmentEnum"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Text alignment for the column."
    },
    "summary_row": {
      "anyOf": [
        {
          "$ref": "#/$defs/DatatableSummaryRowEnum"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Summary function to display at the bottom of the metric column."
    },
    "summary_label": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Custom label for the summary row.",
      "title": "Summary Label"
    }
  },
  "title": "DatatableMetricAppearance",
  "type": "object"
}

One-Click Filter

Set appearance.one_click_filter: true on a metric or dimension to enable Kibana's one-click filtering interaction for that column.

dashboards:
  - name: "Datatable With One-Click Filter"
    panels:
      - title: "Top Services"
        size: {w: 24, h: 15}
        lens:
          type: datatable
          data_view: "logs-*"
          breakdowns:
            - id: "service"
              field: "service.name"
              type: values
              appearance:
                one_click_filter: true
          metrics:
            - id: "request-count"
              aggregation: count
              label: "Request Count"

Column Colors

Datatable metric columns support range-based coloring to highlight values based on numeric thresholds. Configure color.apply_to and optional range settings under color. Range palettes are emitted only when color.thresholds is configured; without thresholds, no range palette is generated even if other range fields are set.

Color Configuration Fields

Field Description
color.apply_to How generated range colors are applied: cell (background color) or text (text color)
color Optional range settings (range_type, range_min, range_max, thresholds)

Example: CPU Usage Thresholds

dashboards:
  - name: "System Metrics"
    panels:
      - title: "CPU Usage by Host"
        size: {w: 24, h: 15}
        lens:
          type: datatable
          data_view: "metrics-*"
          breakdowns:
            - id: "host"
              field: "host.name"
              type: values
          metrics:
            - id: "cpu-avg"
              field: "system.cpu.total.pct"
              aggregation: average
              label: "CPU %"
              color:
                apply_to: cell
                range_type: percent
                range_min: 0
                range_max: 100
                thresholds:
                  - up_to: 50
                    color: '#00BF6F'  # Green for low usage
                  - up_to: 80
                    color: '#FFA500'  # Orange for moderate
                  - up_to: 100
                    color: '#BD271E'  # Red for high usage

For detailed ColorRangeMapping configuration options, see the Color Assignments documentation.

Datatable Appearance

Appearance settings for datatable visualization.

Attributes:

Name Type Description
row_height DatatableRowHeightEnum

Row height mode.

row_height_lines int | None

Number of lines for custom row height (only used with row_height='custom').

header_row_height DatatableRowHeightEnum

Header row height mode.

header_row_height_lines int | None

Number of lines for custom header row height (only used with header_row_height='custom').

density DatatableDensityEnum

Grid density setting.

Show JSON schema:
{
  "$defs": {
    "DatatableDensityEnum": {
      "description": "Density options for datatable.",
      "enum": [
        "compact",
        "normal",
        "expanded"
      ],
      "title": "DatatableDensityEnum",
      "type": "string"
    },
    "DatatableRowHeightEnum": {
      "description": "Row height options for datatable.",
      "enum": [
        "auto",
        "single",
        "custom"
      ],
      "title": "DatatableRowHeightEnum",
      "type": "string"
    }
  },
  "additionalProperties": false,
  "description": "Appearance settings for datatable visualization.",
  "properties": {
    "row_height": {
      "$ref": "#/$defs/DatatableRowHeightEnum",
      "default": "auto",
      "description": "Row height mode."
    },
    "row_height_lines": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Number of lines for custom row height (only used with row_height='custom').",
      "title": "Row Height Lines"
    },
    "header_row_height": {
      "$ref": "#/$defs/DatatableRowHeightEnum",
      "default": "auto",
      "description": "Header row height mode."
    },
    "header_row_height_lines": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Number of lines for custom header row height (only used with header_row_height='custom').",
      "title": "Header Row Height Lines"
    },
    "density": {
      "$ref": "#/$defs/DatatableDensityEnum",
      "default": "normal",
      "description": "Grid density setting."
    }
  },
  "title": "DatatableAppearance",
  "type": "object"
}

Sorting Configuration

Sorting configuration for datatable.

Attributes:

Name Type Description
column_id str

The ID of the column to sort by.

direction Literal['asc', 'desc']

Sort direction.

Show JSON schema:
{
  "additionalProperties": false,
  "description": "Sorting configuration for datatable.",
  "properties": {
    "column_id": {
      "description": "The ID of the column to sort by.",
      "title": "Column Id",
      "type": "string"
    },
    "direction": {
      "default": "asc",
      "description": "Sort direction.",
      "enum": [
        "asc",
        "desc"
      ],
      "title": "Direction",
      "type": "string"
    }
  },
  "required": [
    "column_id"
  ],
  "title": "DatatableSortingConfig",
  "type": "object"
}

Pagination Configuration

Pagination configuration for datatable.

Attributes:

Name Type Description
enabled bool

Whether pagination is enabled.

page_size int

Number of rows per page.

Show JSON schema:
{
  "additionalProperties": false,
  "description": "Pagination configuration for datatable.",
  "properties": {
    "enabled": {
      "default": true,
      "description": "Whether pagination is enabled.",
      "title": "Enabled",
      "type": "boolean"
    },
    "page_size": {
      "default": 10,
      "description": "Number of rows per page.",
      "title": "Page Size",
      "type": "integer"
    }
  },
  "title": "DatatablePagingConfig",
  "type": "object"
}

ES|QL Datatable Charts

Represents a Datatable chart configuration within an ESQL panel.

ESQL datatables can define explicit metrics and breakdowns, or omit them entirely to render all columns returned by the ESQL query.

Examples:

ES|QL datatable with explicit columns:

esql:
  type: datatable
  query: |
    FROM metrics-*
    | STATS count = COUNT(*), avg_cpu = AVG(system.cpu.total.norm.pct) BY service.name
  metrics:
    - id: "count"
      field: "count"
    - id: "avg-cpu"
      field: "avg_cpu"
  breakdowns:
    - id: "service"
      field: "service.name"
  sorting:
    column_id: "count"
    direction: desc

ES|QL datatable with no explicit columns (renders all query result columns):

esql:
  type: datatable
  query: "FROM redis-* | STATS count=COUNT(*) BY host.name"

Attributes:

Name Type Description
metrics list[ESQLDatatableMetricTypes | ESQLMetricTypes]

List of ESQL metrics to display as columns.

breakdowns list[ESQLDatatableBreakdownTypes | ESQLDimensionTypes]

List of ESQL breakdowns to use as row groupings.

metrics_split_by list[ESQLDatatableDimensionTypes | ESQLDimensionTypes] | None

Optional split-metrics-by dimensions (creates separate metric columns for each dimension value).

Show JSON schema:
{
  "$defs": {
    "ColorThreshold": {
      "additionalProperties": false,
      "description": "Single threshold band in a range-based color map.",
      "properties": {
        "up_to": {
          "description": "Upper bound for this threshold band.",
          "title": "Up To",
          "type": "number"
        },
        "color": {
          "description": "The color applied within this threshold band (hex color code).",
          "title": "Color",
          "type": "string"
        }
      },
      "required": [
        "up_to",
        "color"
      ],
      "title": "ColorThreshold",
      "type": "object"
    },
    "DatatableAlignmentEnum": {
      "description": "Alignment options for datatable columns.",
      "enum": [
        "left",
        "right",
        "center"
      ],
      "title": "DatatableAlignmentEnum",
      "type": "string"
    },
    "DatatableAppearance": {
      "additionalProperties": false,
      "description": "Appearance settings for datatable visualization.",
      "properties": {
        "row_height": {
          "$ref": "#/$defs/DatatableRowHeightEnum",
          "default": "auto",
          "description": "Row height mode."
        },
        "row_height_lines": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Number of lines for custom row height (only used with row_height='custom').",
          "title": "Row Height Lines"
        },
        "header_row_height": {
          "$ref": "#/$defs/DatatableRowHeightEnum",
          "default": "auto",
          "description": "Header row height mode."
        },
        "header_row_height_lines": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Number of lines for custom header row height (only used with header_row_height='custom').",
          "title": "Header Row Height Lines"
        },
        "density": {
          "$ref": "#/$defs/DatatableDensityEnum",
          "default": "normal",
          "description": "Grid density setting."
        }
      },
      "title": "DatatableAppearance",
      "type": "object"
    },
    "DatatableColorModeEnum": {
      "description": "Color mode options for datatable columns.",
      "enum": [
        "none",
        "cell",
        "text"
      ],
      "title": "DatatableColorModeEnum",
      "type": "string"
    },
    "DatatableColumnAppearance": {
      "additionalProperties": false,
      "description": "Appearance options shared by datatable metric and dimension columns.",
      "properties": {
        "width": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Column width in pixels.",
          "title": "Width"
        },
        "hidden": {
          "default": false,
          "description": "Whether to hide this column.",
          "title": "Hidden",
          "type": "boolean"
        },
        "one_click_filter": {
          "default": false,
          "description": "Enable one-click filtering for this column.",
          "title": "One Click Filter",
          "type": "boolean"
        },
        "alignment": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableAlignmentEnum"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Text alignment for the column."
        }
      },
      "title": "DatatableColumnAppearance",
      "type": "object"
    },
    "DatatableDensityEnum": {
      "description": "Density options for datatable.",
      "enum": [
        "compact",
        "normal",
        "expanded"
      ],
      "title": "DatatableDensityEnum",
      "type": "string"
    },
    "DatatableMetricAppearance": {
      "additionalProperties": false,
      "description": "Appearance options specific to datatable metric columns.",
      "properties": {
        "width": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Column width in pixels.",
          "title": "Width"
        },
        "hidden": {
          "default": false,
          "description": "Whether to hide this column.",
          "title": "Hidden",
          "type": "boolean"
        },
        "one_click_filter": {
          "default": false,
          "description": "Enable one-click filtering for this column.",
          "title": "One Click Filter",
          "type": "boolean"
        },
        "alignment": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableAlignmentEnum"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Text alignment for the column."
        },
        "summary_row": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableSummaryRowEnum"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Summary function to display at the bottom of the metric column."
        },
        "summary_label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Custom label for the summary row.",
          "title": "Summary Label"
        }
      },
      "title": "DatatableMetricAppearance",
      "type": "object"
    },
    "DatatableMetricColor": {
      "additionalProperties": false,
      "description": "Color settings for datatable metric appearance.",
      "properties": {
        "apply_to": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableColorModeEnum"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "How to apply colors to the metric column."
        },
        "range_type": {
          "default": "number",
          "description": "How threshold values are interpreted by Kibana.",
          "enum": [
            "number",
            "percent"
          ],
          "title": "Range Type",
          "type": "string"
        },
        "range_min": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": 0,
          "description": "Optional lower bound for the palette domain.",
          "title": "Range Min"
        },
        "range_max": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional upper bound for the palette domain.",
          "title": "Range Max"
        },
        "thresholds": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/ColorThreshold"
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Ordered threshold bands used to build datatable palettes.",
          "title": "Thresholds"
        }
      },
      "title": "DatatableMetricColor",
      "type": "object"
    },
    "DatatablePagingConfig": {
      "additionalProperties": false,
      "description": "Pagination configuration for datatable.",
      "properties": {
        "enabled": {
          "default": true,
          "description": "Whether pagination is enabled.",
          "title": "Enabled",
          "type": "boolean"
        },
        "page_size": {
          "default": 10,
          "description": "Number of rows per page.",
          "title": "Page Size",
          "type": "integer"
        }
      },
      "title": "DatatablePagingConfig",
      "type": "object"
    },
    "DatatableRowHeightEnum": {
      "description": "Row height options for datatable.",
      "enum": [
        "auto",
        "single",
        "custom"
      ],
      "title": "DatatableRowHeightEnum",
      "type": "string"
    },
    "DatatableSortingConfig": {
      "additionalProperties": false,
      "description": "Sorting configuration for datatable.",
      "properties": {
        "column_id": {
          "description": "The ID of the column to sort by.",
          "title": "Column Id",
          "type": "string"
        },
        "direction": {
          "default": "asc",
          "description": "Sort direction.",
          "enum": [
            "asc",
            "desc"
          ],
          "title": "Direction",
          "type": "string"
        }
      },
      "required": [
        "column_id"
      ],
      "title": "DatatableSortingConfig",
      "type": "object"
    },
    "DatatableSummaryRowEnum": {
      "description": "Summary row options for datatable columns.",
      "enum": [
        "none",
        "sum",
        "avg",
        "count",
        "min",
        "max"
      ],
      "title": "DatatableSummaryRowEnum",
      "type": "string"
    },
    "ESQLCustomMetricFormat": {
      "additionalProperties": false,
      "description": "Custom format configuration for ES|QL metrics.\n\nAllows specifying a custom number format pattern.\nThis is separate from LensCustomMetricFormat as ES|QL and Lens formatting may diverge in the future.",
      "properties": {
        "type": {
          "const": "custom",
          "default": "custom",
          "title": "Type",
          "type": "string"
        },
        "pattern": {
          "description": "The pattern to display the number in.",
          "title": "Pattern",
          "type": "string"
        }
      },
      "required": [
        "pattern"
      ],
      "title": "ESQLCustomMetricFormat",
      "type": "object"
    },
    "ESQLDatatableBreakdownTypes": {
      "additionalProperties": false,
      "description": "Datatable ES|QL dimension with appearance options.",
      "properties": {
        "appearance": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableColumnAppearance"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Presentation options for this dimension."
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "field": {
          "description": "The field to use for the dimension.",
          "title": "Field",
          "type": "string"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional display label for the dimension.",
          "title": "Label"
        },
        "data_type": {
          "anyOf": [
            {
              "const": "date",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The data type of the field. Set to 'date' for time/date fields to enable proper sorting and formatting.",
          "title": "Data Type"
        }
      },
      "required": [
        "field"
      ],
      "title": "DatatableESQLDimension",
      "type": "object"
    },
    "ESQLDatatableDimensionTypes": {
      "additionalProperties": false,
      "description": "Datatable ES|QL dimension with appearance options.",
      "properties": {
        "appearance": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableColumnAppearance"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Presentation options for this dimension."
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "field": {
          "description": "The field to use for the dimension.",
          "title": "Field",
          "type": "string"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional display label for the dimension.",
          "title": "Label"
        },
        "data_type": {
          "anyOf": [
            {
              "const": "date",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The data type of the field. Set to 'date' for time/date fields to enable proper sorting and formatting.",
          "title": "Data Type"
        }
      },
      "required": [
        "field"
      ],
      "title": "DatatableESQLDimension",
      "type": "object"
    },
    "ESQLDatatableMetricTypes": {
      "additionalProperties": false,
      "description": "Datatable ES|QL metric with appearance options.",
      "properties": {
        "appearance": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableMetricAppearance"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Presentation options for this metric (width, alignment, summary row, etc.)."
        },
        "color": {
          "anyOf": [
            {
              "$ref": "#/$defs/DatatableMetricColor"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Color display mode and optional range mapping for this metric."
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "field": {
          "description": "The field in the data view that this metric is based on.",
          "title": "Field",
          "type": "string"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional display label for the metric.",
          "title": "Label"
        },
        "format": {
          "anyOf": [
            {
              "$ref": "#/$defs/ESQLMetricFormatTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The format of the metric (number, bytes, bits, percent, duration, or custom)."
        }
      },
      "required": [
        "field"
      ],
      "title": "DatatableESQLMetric",
      "type": "object"
    },
    "ESQLDimensionTypes": {
      "additionalProperties": false,
      "description": "A dimension that is defined in the ESQL query.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "field": {
          "description": "The field to use for the dimension.",
          "title": "Field",
          "type": "string"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional display label for the dimension.",
          "title": "Label"
        },
        "data_type": {
          "anyOf": [
            {
              "const": "date",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The data type of the field. Set to 'date' for time/date fields to enable proper sorting and formatting.",
          "title": "Data Type"
        }
      },
      "required": [
        "field"
      ],
      "title": "ESQLDimension",
      "type": "object"
    },
    "ESQLMetricFormat": {
      "additionalProperties": false,
      "description": "The format configuration for ES|QL metrics.\n\nSupports standard format types like number, bytes, bits, percent, and duration.\nThis is separate from LensMetricFormat as ES|QL and Lens formatting may diverge in the future.",
      "properties": {
        "type": {
          "enum": [
            "number",
            "bytes",
            "bits",
            "percent",
            "duration"
          ],
          "title": "Type",
          "type": "string"
        },
        "decimals": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The number of decimal places to display. If not specified, defaults to 2 for number/bytes/percent/duration, 0 for bits.",
          "title": "Decimals"
        },
        "suffix": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The suffix to display after the number.",
          "title": "Suffix"
        },
        "compact": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Whether to display the number in a compact format.",
          "title": "Compact"
        },
        "pattern": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The pattern to display the number in.",
          "title": "Pattern"
        }
      },
      "required": [
        "type"
      ],
      "title": "ESQLMetricFormat",
      "type": "object"
    },
    "ESQLMetricFormatTypes": {
      "anyOf": [
        {
          "$ref": "#/$defs/ESQLMetricFormat"
        },
        {
          "$ref": "#/$defs/ESQLCustomMetricFormat"
        }
      ]
    },
    "ESQLMetricTypes": {
      "additionalProperties": false,
      "description": "A metric that is defined in the ESQL query.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A unique identifier. If not provided, one will be generated automatically.",
          "title": "Id"
        },
        "field": {
          "description": "The field in the data view that this metric is based on.",
          "title": "Field",
          "type": "string"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional display label for the metric.",
          "title": "Label"
        },
        "format": {
          "anyOf": [
            {
              "$ref": "#/$defs/ESQLMetricFormatTypes"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The format of the metric (number, bytes, bits, percent, duration, or custom)."
        }
      },
      "required": [
        "field"
      ],
      "title": "ESQLMetric",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "description": "Represents a Datatable chart configuration within an ESQL panel.\n\nESQL datatables can define explicit metrics and breakdowns, or omit them entirely\nto render all columns returned by the ESQL query.\n\nExamples:\n    ES|QL datatable with explicit columns:\n    ```yaml\n    esql:\n      type: datatable\n      query: |\n        FROM metrics-*\n        | STATS count = COUNT(*), avg_cpu = AVG(system.cpu.total.norm.pct) BY service.name\n      metrics:\n        - id: \"count\"\n          field: \"count\"\n        - id: \"avg-cpu\"\n          field: \"avg_cpu\"\n      breakdowns:\n        - id: \"service\"\n          field: \"service.name\"\n      sorting:\n        column_id: \"count\"\n        direction: desc\n    ```\n\n    ES|QL datatable with no explicit columns (renders all query result columns):\n    ```yaml\n    esql:\n      type: datatable\n      query: \"FROM redis-* | STATS count=COUNT(*) BY host.name\"\n    ```",
  "properties": {
    "type": {
      "const": "datatable",
      "default": "datatable",
      "description": "The type of chart, which is 'datatable' for this visualization.",
      "title": "Type",
      "type": "string"
    },
    "appearance": {
      "anyOf": [
        {
          "$ref": "#/$defs/DatatableAppearance"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Appearance settings for the datatable."
    },
    "sorting": {
      "anyOf": [
        {
          "$ref": "#/$defs/DatatableSortingConfig"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional sorting configuration."
    },
    "paging": {
      "anyOf": [
        {
          "$ref": "#/$defs/DatatablePagingConfig"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional pagination configuration."
    },
    "id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "A unique identifier. If not provided, one will be generated automatically.",
      "title": "Id"
    },
    "metrics": {
      "description": "List of ESQL metrics to display as columns.",
      "items": {
        "anyOf": [
          {
            "$ref": "#/$defs/ESQLDatatableMetricTypes"
          },
          {
            "$ref": "#/$defs/ESQLMetricTypes"
          }
        ]
      },
      "title": "Metrics",
      "type": "array"
    },
    "breakdowns": {
      "description": "List of ESQL breakdowns to use as row groupings.",
      "items": {
        "anyOf": [
          {
            "$ref": "#/$defs/ESQLDatatableBreakdownTypes"
          },
          {
            "$ref": "#/$defs/ESQLDimensionTypes"
          }
        ]
      },
      "title": "Breakdowns",
      "type": "array"
    },
    "metrics_split_by": {
      "anyOf": [
        {
          "items": {
            "anyOf": [
              {
                "$ref": "#/$defs/ESQLDatatableDimensionTypes"
              },
              {
                "$ref": "#/$defs/ESQLDimensionTypes"
              }
            ]
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional split-metrics-by dimensions (creates separate metric columns for each dimension value).",
      "title": "Metrics Split By"
    }
  },
  "title": "ESQLDatatableChart",
  "type": "object"
}