Skip to content

[ES|QL] Send the associated named param to the response (as meta in the columns payload) #118312

@stratoula

Description

@stratoula

Description

At kibana we are planning to use named parameters in dashboards. (and eventually everywhere across kibana). The idea is that the user is writing a query with a named param and a UI control is being generated that controls this ES|QL query.

The query can be used to create a chart, a datatable etc.

An example can be found below. I have a chart which is running this query FROM logs* | STATS var0 = COUNT(*) BY ?breakdown. I have the breakdown column mapped to the horizontal axis of the bar chart and the count in the vertical axis.

A control (a dropdown) has the possible values of the ?breakdown.

Image

The above query FROM logs* | STATS var0 = COUNT(*) BY ?breakdown will return 2 columns (the one selected from the dropdown and the var0). There is no indication from the response which variable is associated with the first column. But we need this to be sure that the generated chart works as expected.

Right now we are trying to parse the query and get this association. But is not always easy as the users can make complex things.

This issue's ask is to check if this info is easier for you to extract and send it to the payload (can be something kibana related, not part of the official api).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions