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

[DataView] Improve automatic timeFieldName selection #153872

Closed
Tracked by #166175
kertal opened this issue Mar 28, 2023 · 2 comments
Closed
Tracked by #166175

[DataView] Improve automatic timeFieldName selection #153872

kertal opened this issue Mar 28, 2023 · 2 comments
Labels
enhancement New value added to drive a business result Feature:Discover Discover Application Icebox impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Data, DataViews)

Comments

@kertal
Copy link
Member

kertal commented Mar 28, 2023

When creating a ad-hoc data view in the UI in a quick way, not using the flyout, there's a check if there's a @timestamp field available with the right mapping. In this case this is automatically selected as timeFieldName in the create data view. This logic is duplicated in several places. So it should be centralized (e.g. as a helper function in dataViews or a method of a data view instance).

Here's some code using this logic:

newDataView.timeFieldName = '@timestamp';

dataView.timeFieldName = '@timestamp';

Furthermore this logic could be improved to

  • Select a data field if there's just a single one in the mapping
  • Check for more fields like @timestamp ... e.g. timestamp
  • Take ECS fields into the consideration

On the long run, it would be helpful to suggest matching fields for timeFieldName, and let the user select it. Or maybe also allow to quickly switch the time field in the field list.

Surfaced in #152640 (comment) index pattern management would also be a good candidate for applying the shared logic

@kertal kertal added the Feature:Discover Discover Application label Mar 28, 2023
@botelastic botelastic bot added the needs-team Issues missing a team label label Mar 28, 2023
@kertal kertal added enhancement New value added to drive a business result Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Data, DataViews) labels Mar 28, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Mar 28, 2023
@KOTungseth KOTungseth added loe:medium Medium Level of Effort impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. labels Mar 30, 2023
@kertal kertal added the Icebox label Sep 24, 2024
@kertal
Copy link
Member Author

kertal commented Sep 24, 2024

Closing this because it's not planned to be resolved in the foreseeable future. It will be tracked in our Icebox and will be re-opened if our priorities change. Feel free to re-open if you think it should be melted sooner.

@kertal kertal closed this as not planned Won't fix, can't repro, duplicate, stale Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Discover Discover Application Icebox impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Data, DataViews)
Projects
None yet
Development

No branches or pull requests

3 participants