[Reporting-CSV Export] Re-write CSV Export using SearchSource#88303
[Reporting-CSV Export] Re-write CSV Export using SearchSource#88303tsullivan merged 62 commits intoelastic:masterfrom
Conversation
280d4b9 to
54c23fc
Compare
01eebe4 to
21b4cee
Compare
56f7938 to
91c4372
Compare
ab59e88 to
5d6550e
Compare
e24a638 to
8777211
Compare
8777211 to
b13253d
Compare
|
@elasticmachine merge upstream |
majagrubic
left a comment
There was a problem hiding this comment.
I had a quick look at this. When exporting a saved search with just the default column - Document the fields are not sorted. When exporting them from _source, they are sorted. I think we should make this consistent. I haven't had a look at the code yet, but one thing to note is that fields in the API response don't come sorted - they need to be sorted client-side.
|
|
||
| const fields = fieldValues[fieldSource]; | ||
| // Check if field name values are string[] and if the fields are user-defined | ||
| if (isPlainStringArray(fields)) { |
There was a problem hiding this comment.
why do we try to first parse fields from searchsource instead of always just using the ones in the table ?
There was a problem hiding this comment.
if its tabify dropping fields that don't exist in response (but do exist in searchsource) and discover is actually showing those fields, then we should probably update tabify.
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
majagrubic
left a comment
There was a problem hiding this comment.
I had a quick look at this, changes look good to me. I am not very familiar with the reporting code. Discover-related code LGTM 👍
|
Pinging @elastic/kibana-app-services (Team:AppServices) |
Summary
Resolves #81079
Hide 'Time' columnsetting doesn't work with export to CSV #34377This PR adds a new export type keyed by
csv_searchsourcewhich runs the query and data formatting through SearchSource methods.The existing
csvexport type has already been labeled in the code as deprecated. This export type will have to remain throughout 7.x as it could be referenced in Watcher scripts in customer environments.Checklist
Delete any items that are not applicable to this PR.
[ ] Ensure relative time range is supported: Reporting URL from Discover has no relative time range mode #22261existing bug won't be fixed in first phasedoc_table:hideTimeColumnis false (default):Hide 'Time' columnsetting doesn't work with export to CSV #34377generateCsvscan and scroll replacementFor maintainers