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

[Discover][Main] Introduce dataType text for enable rendering for text based query languages #134654

Closed
kertal opened this issue Jun 17, 2022 · 3 comments
Assignees
Labels
enhancement New value added to drive a business result Feature:Discover Discover Application Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. WIP Work in progress

Comments

@kertal
Copy link
Member

kertal commented Jun 17, 2022

Discover currently is optimized for handling searches of documents in Elasticsearch. Due to our upcoming support of text based query languages we need to make our interface configureable to handle aggregated and similar data. To start a MVP to allowing displaying the results of a SQL query we should make Discover configureable.

Generally we are using Observable to connect data state changes with ui state changes. This channel should be used to let the UI know which kind of data is to be expected. We should extend our current base message with recordRawType indicating which kind of data records are expected:

export enum RecordRawType {
  /**
   * Documents returned from Elasticsearch, nested structure
   */
  DOCUMENT = 'document',
  /**
   * Data returned e.g. SQL queries, flat structure
   * */
  PLAIN = 'plain',
}

export interface DataMsg {
  fetchStatus: FetchStatus;
  error?: Error;
  recordRawType?: RecordRawType;
}

This way all messages sent to the UI can be used to read this state.

Depending on recordRawType , Discover's main interface should provide different features

Generally

feature document plain
add filters -
field statistics -
histogram -
number of hits -
Surrounding documents -
Single document -

Toolbar

feature document plain
Alerts -
Share -

Sidebar

Currently sidebar is displaying documents of the dataView, when using SQL it should show the fields of the SQL result

feature document plain
add filters -
filter fields -
field popover - later on
popular fields -
add field -

Also don't show field type icons with plain data. We could just partly match those with data view field, so the MVP approach is: don's show them for now.

Document explorer

When using text based languages no time field should be prepended

feature document plain
Doc expansion -
Sorting -
Document selection ✅ ... it would work, so why not

Classic table should not be supported for this effort, there should be info panel to inform the user. Generally it's recommendable to configure e.h. the availability of filter functionality by providing or not providing the function depending on recordRawType ... no filter functionality when plain data records are used. With this way we can prevent adding new parameters to components.

POC: #134984
Storybook PR, useful for development of UI: #134716

@kertal kertal added Feature:Discover Discover Application enhancement New value added to drive a business result Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. labels Jun 17, 2022
@elasticmachine
Copy link
Contributor

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

@kertal kertal changed the title [Discover][Main] Introduce feature configuration [Discover][Main] Introduce dataType text Jun 17, 2022
@kertal kertal changed the title [Discover][Main] Introduce dataType text [Discover][Main] Introduce dataType text for enable rendering for text based query languages Jun 21, 2022
@dimaanj dimaanj self-assigned this Jun 27, 2022
@dimaanj dimaanj added the WIP Work in progress label Jun 27, 2022
@stratoula
Copy link
Contributor

@kertal I think we can close this, right?

@kertal
Copy link
Member Author

kertal commented Jul 26, 2022

sure, thx

@kertal kertal closed this as completed Jul 26, 2022
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 Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. WIP Work in progress
Projects
None yet
Development

No branches or pull requests

4 participants