Skip to content

[ES|QL] Fetch the query columns utils#181969

Merged
stratoula merged 6 commits intoelastic:mainfrom
stratoula:add-fetch-columns-utils
May 1, 2024
Merged

[ES|QL] Fetch the query columns utils#181969
stratoula merged 6 commits intoelastic:mainfrom
stratoula:add-fetch-columns-utils

Conversation

@stratoula
Copy link
Copy Markdown
Contributor

@stratoula stratoula commented Apr 29, 2024

Summary

Adds a new utility for the users who want to retrieve the columns from a query without expressions but using the search strategy.

This is the first utility to add for fetching ES|QL data without expressions. This is only for columns but we can extend for fetching the entire table instead. The latter will be part of #179641 (comment)

@stratoula
Copy link
Copy Markdown
Contributor Author

/ci

@stratoula stratoula changed the title [ES|QL] Add columns utils [ES|QL] Fetch the query columns utils Apr 29, 2024
@stratoula stratoula added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Feature:ES|QL ES|QL related features in Kibana Team:ESQL ES|QL related features in Kibana t// v8.15.0 labels Apr 29, 2024
@stratoula stratoula marked this pull request as ready for review April 29, 2024 14:19
@stratoula stratoula requested review from a team as code owners April 29, 2024 14:19
@elasticmachine
Copy link
Copy Markdown
Contributor

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

search.search(
{
params: {
query: `${esqlQuery} | limit 0`,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to add the limit 0 as @dej611 correctly noticed.

@dej611 good catch!

@stratoula
Copy link
Copy Markdown
Contributor Author

/ci

Copy link
Copy Markdown
Contributor

@dej611 dej611 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the latest fix is works ok. Tested locally 👍

@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
aiops 493 494 +1
apm 1675 1676 +1
data 509 510 +1
dataVisualizer 671 672 +1
discover 793 794 +1
eventAnnotationListing 509 510 +1
infra 1466 1472 +6
lens 1411 1412 +1
lists 288 289 +1
logsExplorer 584 585 +1
maps 1165 1166 +1
ml 2030 2031 +1
observabilityAIAssistantApp 236 242 +6
securitySolution 5463 5464 +1
slo 730 731 +1
stackAlerts 145 151 +6
unifiedHistogram 138 139 +1
unifiedSearch 251 252 +1
total +33

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/esql-utils 22 27 +5

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
lens 1.4MB 1.4MB +628.0B
Unknown metric groups

API count

id before after diff
@kbn/esql-utils 24 29 +5

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Copy Markdown
Contributor

@drewdaemon drewdaemon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (code review)

@stratoula stratoula merged commit 4262afe into elastic:main May 1, 2024
stratoula added a commit to stratoula/kibana that referenced this pull request May 1, 2024
sorenlouv added a commit to klacabane/kibana that referenced this pull request May 1, 2024
stratoula added a commit that referenced this pull request May 1, 2024
stratoula added a commit that referenced this pull request May 6, 2024
## Summary

Revives this #181969

To do so, I had to create a new package `search-types` and move the
types I need there.

The Discovery team can take it from here.

Note: It also does a cleanup on the types I move, some of them were
declared twice.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:ES|QL ES|QL related features in Kibana release_note:skip Skip the PR/issue when compiling release notes Team:ESQL ES|QL related features in Kibana t// v8.15.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants