Skip to content
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

Add PPL frontend handler #4

Merged
merged 6 commits into from
Dec 16, 2020
Merged

Add PPL frontend handler #4

merged 6 commits into from
Dec 16, 2020

Conversation

euniceek
Copy link
Collaborator

@euniceek euniceek commented Dec 15, 2020

What this PR does / why we need it:

This PR contains all the changes required for basic PPL support from the Elasticsearch plugin on the client-side, minus the UI changes. Basic PPL support entails being able to write PPL queries in the query editor and visualize responses from Elasticsearch instances with the ODFE SQL plugin installed. Expected functionality such as variable interpolation and ad hoc filtering will also work with PPL queries.

Query Builder:

The default PPL query is set to request for all data fields in the index specified by the user when configuring the Elasticsearch datasource. The PPL query builder also includes a time range filter by default to ensure the response is in the range specified by the user through the Grafana’s time range drop down menu.
Ad hoc filters for PPL are handled using the where command which gets added onto the user inputted query string in the main PPL query builder method.

Logs and Table Response Parser:

The response structure for PPL is in JDBC format, meaning the response consists of a schema containing the response field name and type, and the datarows array containing the data results. These two components are merged together and flattened to work with the current Elasticsearch data frame structure.
image
image

Time Series Response Parser:

In order for users to create time series queries with PPL, there are a few requirements for how the inputted query should be formatted. One of the returned column must have a valid date time type supported by PPL, which are timestamp, datetime, date. Response must also include another column with numeric datatype as values. No additional columns should be returned other than the two. If any of these requirements are not met, users will be outputted with an error.
image

@euniceek euniceek changed the title Ppl frontend handler Add PPL frontend handler Dec 15, 2020
@alexanderzobnin alexanderzobnin merged commit 469dc90 into master Dec 16, 2020
@Elfo404 Elfo404 deleted the ppl-frontend-handler branch April 14, 2021 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants