elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.52k stars 8.07k forks source link

Suggestions refactoring #145571

Open flash1293 opened 1 year ago

flash1293 commented 1 year ago

Current state

Right now, suggestions are working this way:

This approach gives a lot of flexibility, no assumptions about what the datasource or the visualization can do is hardcoded - the only interface is the table data structure.

However, due to that a lot of responsibility is shifted to the suggestion black box functions for visualizations and datasources:

Target state

To address the pain points from above, the following general architecture would make more sense:

Instead of operating on possible tables and how they map to visualization states, refactor the suggestion logic to operate on possible columns of a data table and visualization dimensions to map them to.

The new flow would look like this:

Advantages

Disadvantages

elasticmachine commented 1 year ago

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