Skip to content

[ES|QL] Query History #173217

Description

@timductive

The query history feature aims to enhance user experience in ES|QL by providing a list of recently executed queries to the user.

image

There are six main user stories for this MVP release of this feature, and they are described below:

ID Title Requirement Ready-for-development
1 Access to recent queries Users can access a list of the last 20 x ESQL queries that they have executed in that browser ✅
2 Re-run the query by selecting a query history item Allows users to easily locate and rerun specific queries from the history list without retyping. ✅
3 Be able to copy a query from the query history list. Users should be able to copy a “Query History Item” ✅
4 View details/metadata information about the query, when it was run and duration Users should be able to view metadata information about each query for “Time ran” and “Last Duration” which indicates when the query was executed and how long the duration was. ✅
5 View if the query was successful, errored, or had a warning in the query history list view. As a user, I want to see if the query I ran was successful, errored, or had warnings. ✅
6 Re-size the query history and/or the ESQL editor As a user, I want to be able to re-size the Query History part of the editor or/and the ESQL query builder. ✅

Note

The query history will be available in these ES|QL editors:

  • Compact Editor
  • Expanded Editor
  • In-line Editor

Storage:

  • These are not saved queries, just executed/run queries run by the user logged in working in that browser
  • The queries are stored in the browser, which means e.g. that they are not accessible in a different browser, and are temporarily stored.
  • We should ensure storing them in a secure way in the browser.

Storing successful vs errored queries:
The reason for not storing many errored queries is that many new users would have syntax errors while learning ESIQL and it would pollute the limited query history items with irrelevant items.

  • We will have two buckets to store the query history items.
  • One to store successful queries and queries with warnings
  • Another bucket for error-pruned queries. We will only show the last 5 errored/failed queries and the last 15 successful and/or with a warning. 20 query history items in total.

Activity

  1. added
    enhancementNew value added to drive a business result
    Team:VisualizationsTeam label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//
    impact:mediumAddressing this issue will have a medium level of impact on the quality/strength of our product.
    Feature:ES|QLES|QL related features in Kibana
    on Dec 12, 2023
  2. elasticmachine commented on Dec 12, 2023

    @elasticmachine
    Contributor

    Pinging @elastic/kibana-visualizations (Team:Visualizations)

  3. ninoslavmiskovic commented on Jan 29, 2024

    @ninoslavmiskovic
    Contributor

    @stratoula , @timductive and @MichaelMarcialis - I have updated this issue with the main user stories and details. Take a look.

  4. ryankeairns commented on Mar 12, 2024

    @ryankeairns
    Contributor

    Capturing some design clarifications from a Slack/EUI thread on the main 'Run query' button.

    With the One Discover/ES|QL-first efforts we are also considering changes to the Run button (granted, it is earlier on).

    • Andrea and I were looking to use the secondary green color to better differentiate the ES|QL mode (from the data view-oriented mode) and gain more contrast to the other primary CTA (Save).
    • Design feedback on the wireframe shared above - we aligned that the shortcut could be in a tooltip, instead of inside the button

    Once the EUI side of this is done (enabling overrides of the button text), we can then make the following overrides on the Kibana side:

    • Keep it blue/primary for now (no change to color)
    • Change the label to Run
    • Show the play icon
    • Show the keyboard shortcut in a (delayed) tooltip

    End result for this pass:

    CleanShot 2024-03-12 at 10 50 45@2x

    Later, we can consider further evolving the styles (e.g. to green, maybe icon-only) as the other initiatives progress.

  5. added
    Team:ESQLES|QL related features in Kibana t//
    and removed
    Team:VisualizationsTeam label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//
    on Mar 27, 2024
  6. elasticmachine commented on Mar 27, 2024

    @elasticmachine
    Contributor

    Pinging @elastic/kibana-esql (Team:ESQL)

  7. added a commit that references this issue on Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Feature:ES|QLES|QL related features in KibanaTeam:ESQLES|QL related features in Kibana t//enhancementNew value added to drive a business resultepicimpact:mediumAddressing this issue will have a medium level of impact on the quality/strength of our product.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions