-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Discover] - Add Breakdown Field Option in Field Stats Popover #192700
Comments
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
@stratoula do we need inline stats to support this in ES|QL or is it possible today? |
I need to understand better the ER first to reply. @ninoslavmiskovic in your screenshot and description you mention this
which means I am changing the query of Discover regardless what I have in the editor atm. Which is weird and not what the users are expecting. This suggestion doesn't need inlinestats but I don't think we should do it. What it would make sense is that when the users are clicking a field then we update the current query with a stats something like
this makes more sense to me and is not blocked by inlinestats If we want by clicking this to update the histogram and only (add a breakdown) this needs inlinestats but I don't like it as the main query is independent of the histogram query so the users dont get what is done. Adding a breakdown in the histogram can be accomplished when we have inlinestats from the inline editing flyout. I wouldn't add this functionality to the field list. |
@stratoula This is what I wanted. Similar to what we do with WHERE. Just add the right syntax to the query. Question: when we get inline stats - could we both update the query and select the breakdown by in the histogram ? |
In dataview mode we could simply update the histogram. I guess ?! |
No because stats in the initial query displays the aggregation chart and not the histogram |
I have changed the GH issue description to add a STATS and a note which would produce an aggregated chart instead of the histogram. QQ: Currently, it is possible to create a histogram in ES|QL with a break-down by:
This creates this histogram visualization: And also updates the "Break-down by" in the inline editor. How would this work with INLINE stats ? What would the query be like and the UX in the inline editor ? |
This creates the histogram but only for the specific field, we want the users to also be able to choose among other fields this is why we want inline stats instead of stats. With that being said the query is the same but instead of stats you use inlinestats. I have an implementation here already #189630 but is blocked by inlinestats being available only on snapshot releases. And this is a step forward #190213 and initializes the histogram with the log.level but also allows the users to choose a field from the inline editing |
Super clear ! Makes sense. Great with the links to the issues. @stratoula WDYT of the current specification with doing GROUP by with STATS instead ? and then when we are ready we can add the break-down with in-line stats. This would decouple the efforts like you mentioned. |
We are also blocked by this #191988 so we need to wait for both. |
@stratoula I added this part: If STATS is already present in the ES|QL query, then hide the button. |
The first step on ES|QL mode will be to add the break-down and @stratoula is working on this here: #186369 which is not longer blocked. After that work is finished, the break-down on field stats pop-over can be added. |
Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs) |
Hi! I'm validating the designs (particularly the new icon) with Platform. We should be done soon. |
Hi @ninoslavmiskovic @gbamparop, here are the design details Instructions:
Additional Notes:The current popover design may benefit from some clarity regarding the functionality of the "plus" button, especially when adding to the table versus adding as a filter. They use the same icon, and it's currently quite confusing. It could also use some design refinement to ensure every action is easily accessible and affordable. Looking ahead, considering the use of an overflow menu for less common actions could be an interesting approach. Here are some early explorations cc/ @l-suarez |
Thanks @patpscal! To clarify, these suggestions are for a follow-up and not blocking the current issue right? |
Yes @gbamparop, at least from my side I would defer them to future improvements |
@l-suarez would love your feedback here. @MichaelMarcialis I remember there were some hesitations around the filter icons previously, so we did not change them. Also feel free to provide feedback. |
I will take a look @patpscal 👍 |
Correct, there were some past concerns about using the |
Thanks @patpscal, great work. As Michael mentions, we will wait until the refresh is done to get the new iconography in place. For now, could we use the new icon that Patri proposes? It represents the histogram action more accurately, rather than the pie chart. We're adding a new action to the group in the field popover, so currently we display four. Which is fine. If in the future we need to add new ones, I recommend to go for the overflow example that Patri suggests. Main 1 or 2 actions visible and secondary actions under a more menu. cc / @ninoslavmiskovic |
closes #192700 ## 📝 Summary This PR add a new `Add breakdown` button to the field stats popover for all applicable fields. ## 🎥 Demo https://github.com/user-attachments/assets/d647189c-9b04-4127-a4fd-f9764babe46e --------- Co-authored-by: kibanamachine <[email protected]>
closes elastic#192700 ## 📝 Summary This PR add a new `Add breakdown` button to the field stats popover for all applicable fields. ## 🎥 Demo https://github.com/user-attachments/assets/d647189c-9b04-4127-a4fd-f9764babe46e --------- Co-authored-by: kibanamachine <[email protected]> (cherry picked from commit 7369442)
closes elastic#192700 ## 📝 Summary This PR add a new `Add breakdown` button to the field stats popover for all applicable fields. ## 🎥 Demo https://github.com/user-attachments/assets/d647189c-9b04-4127-a4fd-f9764babe46e --------- Co-authored-by: kibanamachine <[email protected]>
closes elastic#192700 ## 📝 Summary This PR add a new `Add breakdown` button to the field stats popover for all applicable fields. ## 🎥 Demo https://github.com/user-attachments/assets/d647189c-9b04-4127-a4fd-f9764babe46e --------- Co-authored-by: kibanamachine <[email protected]>
WHY:
In Discover, users frequently need to break down data by specific fields. While this is currently possible through the histogram, there is no way to initiate a breakdown directly from the field stats popover. Adding this capability would streamline workflows, allowing users to apply breakdowns more quickly without navigating away from the field stats view.
WHAT:
Introduce an “Add Breakdown” option within the field stats popover, supporting both KQL and ES|QL:
For ES|QL, it will be achieved by the same way as in DSL mode with one exception. If STATS is already present in the ES|QL query, then hide the button.
Supported Field Types for Breakdown:
The breakdown functionality should support any field type that can be aggregated in Elasticsearch for DSL mode. This includes:
These field types are commonly used for aggregation in Elasticsearch, making them ideal for breakdowns. When a user selects one of these fields in the stats popover, the system should enable the “Add Breakdown” option, allowing for segmentation based on that field.
For ESQL we have a broader usage, the
isESQLColumnGroupable
can be used to find the groupable fields.BENEFITS:
The text was updated successfully, but these errors were encountered: