-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vega: use elasticsearch's _query endpoint for queries #62333
Comments
Pinging @elastic/kibana-app (Team:KibanaApp) |
A little more context:
Another option would be to leverage the expression framework here and provide a separate dedicated SQL input for the sql query and a different expression ( |
This is worth revisiting now that Vega is in GA, as I'd really like to see Vega support SQL and EQL. Vega already supports querying using:
The SQL and EQL endpoints are very simple, but they are not exposed directly in the browser so that increases the complexity of the integration. If we could have SQL and EQL support in the search source it would make this easier, but I don't think that's likely to happen soon. What if we add a Vega server which exposes a SQL and EQL querying endpoint? |
Possibly we need to rethink it and instead of supporting _sql support ES|QL instead (_query api) |
Assuming _sql can be used to make pipelined queries i.e. first result forms basis for second query +1. If this is simple to add, this is incredibly powerful for combining queries across non-time series indices with time-series indices. |
Describe the feature: Allow usage of the elasticsearch
/_sql
endpoint with the Vega visualization / plugin.Describe a specific use case for the feature: Allow graphing using vega, while using standard SQL syntax to query for the data in elasticsearch.
It is a challenge to build the elasticsearch query, then have to fully transform the return data from elasticsearch's aggregation to something that Vega can use. The SQL endpoint seems like it would be easier to get back something closer to a flattened table.
From Vega's documentation, most examples have a simple array of single level objects, where each object contains what needs to be plotted:
The sql endpoint will return the data shaped like
This would still need to be transformed to combine the column names to create each row as an object (might be an enhancement for elasticsearch to return something similar to the Vega example structure above).
cc: @flash1293
The text was updated successfully, but these errors were encountered: