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

[Runtime fields] Dedicated UI for data parsing #98929

Open
sebelga opened this issue Apr 30, 2021 · 1 comment
Open

[Runtime fields] Dedicated UI for data parsing #98929

sebelga opened this issue Apr 30, 2021 · 1 comment
Labels
Feature:New Feature New feature not correlating to an existing feature label Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more

Comments

@sebelga
Copy link
Contributor

sebelga commented Apr 30, 2021

We need to build a dedicated UI for parsing a string into fields. This UI needs to be as simple (and "mouse click") as possible. We need to guide our users with very little knowledge of grok and help them write a pattern with confidence.

This work can be split into the following tasks:

  • Select the source (the index pattern and the field). This will most often come from the previous app where the user navigated from (and probably passed through query params).
  • Parse a string into and object. Once the source is defined (we have the index pattern and the field) we can prepopulate the string to parse with one of the documents (e.g. the message field from the first document of "logs-*" index pattern). This string can still be edited by the user if he wants to.
{
  "message": "the string that the user has entered in the form"
}

and (2) the script we have automatically created for the user

"script": '''
    Map fields = grok('%{grok the user entered}') .extract(doc["message"].value);
    for (Map.Entry field : fields) {
      emit(field.getKey(), field.getValue());
    }
'''

The output of this task is an object that we can feed to the field selector below.

  • A field selector. This component will display the fields that have been parsed and provide recommended type for each of them. The user can decide which field(s) he wants to extract.
    The field selector might already be exposed when doing [Index pattern field editor] Support "object" runtime fields #98330.
  • Give the option to the user to "Edit the script" (to support advanced data parsing use cases). This will open the current field editor with the object runtime field and the generated script. If the user modifies the script he won't be able to go back to the parsing UI as that UI won't be able to handle custom Painless script logic.
  • IN/OUT interface. Define the architecture on how the consuming app will provide parameters to this new UI (index pattern, field to parse...) and how we will expose the generated fields to the consuming app (it might not be necessary to do anything as when the user will return to the consuming app the fields will be fetched again and the new runtime object field will appear)
@sebelga sebelga added the Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more label Apr 30, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui (Team:Elasticsearch UI)

@cjcenizal cjcenizal added the Feature:New Feature New feature not correlating to an existing feature label label Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:New Feature New feature not correlating to an existing feature label Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
Projects
None yet
Development

No branches or pull requests

3 participants