-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[PoC] reporting csv generation from searchSource #81446
Conversation
Pinging @elastic/kibana-app-arch (Team:AppArch) |
title: savedSearch.title, | ||
taskType: 'csv', | ||
taskConfig: { | ||
...sharingData, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sharingData
is the return value of searchSource.getSerializedFields
:
"searchSource": {
"fields": [
"@date",
"name",
...
],
"filter": [],
"index": "bab57370-1266-11eb-aa87-cb7590d2fd4a",
"query": {
"language": "kuery",
"query": ""
},
"version": true
},
Would it be possible for CSV export to use just the ID of the saved search object as the params? If so, could the searchSource object come from that ID?
If someone has automated CSV export and makes changes to the saved search after scheduling the automation, their changes should be reflected in subsequent runs of the export.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we should try to get away from dependency between csv report and existing saved search. This way we can create csv report on any search made with searchsource without requirement for backing saved search object (for example export csv from visulalization, or on discover without persisting the current view)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be really interesting to see how that plays out, and I think we should carry on in this direction!
There is a related issue that could be solved with this approach: #18439 (see option 3)
searchRequest: sharingData.searchRequest as SearchRequest, | ||
fields: sharingData.fields as string[], | ||
metaFields: sharingData.metaFields as string[], | ||
conflictedTypesFields: sharingData.conflictedTypesFields as string[], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes the object defining the job parameters, which is a breaking change. The job parameters are preserved in "POST URL" strings, which users copy into Watcher for automatic report generation.
Is it possible to keep BWC with the legacy parameters? If not, then we will create a new ExportTypeDefinition
in Reporting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll create a new Export type definition
} | ||
break; | ||
const columns = table.columns.map((c) => { | ||
// we are working on this utilities, its not there yet but should be in a week or so, which will get us the formatted values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ppisljar will you be able to update this PR in the near future? This TODO should be taken care of by now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes i will continue working on this (after new year)
28073ef
to
66b7659
Compare
💔 Build Failed
Failed CI Steps
Test FailuresChrome X-Pack UI Functional Tests.x-pack/test/functional/apps/discover/reporting·ts.discover Discover Generate CSV button becomes available when savedStandard Out
Stack Trace
Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/dashboard/reporting/download_csv·ts.dashboard Reporting Download CSV Downloads a CSV export of a saved search panelStandard Out
Stack Trace
Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/security/secure_roles_perm·js.security app secure roles and permissions Kibana User navigating to Discover and trying to generate CSV gets - Authorization ErrorStandard Out
Stack Trace
and 56 more failures, only showing the first 3. Metrics [docs]Async chunks
Distributable file count
Page load bundle
History
To update your PR or re-run it, just comment with: |
I'm plan to pick up on this next week. |
Replaced with #88303 |
Summary
Summarize your PR. If it involves visual changes include a screenshot or gif.
Checklist
Delete any items that are not applicable to this PR.
For maintainers