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

[Lens] Filter columns not visible in the visualization for CSV download #121802

Closed
wants to merge 9 commits into from

Conversation

dej611
Copy link
Contributor

@dej611 dej611 commented Dec 21, 2021

Summary

Fix #121063

This PR makes the CSV download (within the Lens editor) aware of visible vs invisible columns in the visualization, filtering them for both (spreadsheet) formula check & csv download.

Because there's no easy way to directly test the fix, I've used the indirect formula check which produces a warning message to test it.

Some questions

  • So far math functions as Cumulative Sum, Differences and others have been exported with their referenced columns. Is this "fix" considered as a breaking change? Or was the previous behaviour a bug?
  • Would it make sense to have a "full" mode here to export the entire table?
  • Should this feature be extended also to support the "hidden" feature in the datatable visualization?

Checklist

Delete any items that are not applicable to this PR.

@dej611 dej611 added Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens backport:skip This commit does not require backporting v8.1.0 labels Dec 21, 2021
@dej611
Copy link
Contributor Author

dej611 commented Dec 22, 2021

@elasticmachine merge upstream

@dej611
Copy link
Contributor Author

dej611 commented Dec 28, 2021

@elasticmachine merge upstream

@dej611
Copy link
Contributor Author

dej611 commented Dec 30, 2021

@elasticmachine merge upstream

@dej611 dej611 marked this pull request as ready for review December 31, 2021 13:35
@dej611 dej611 requested a review from a team as a code owner December 31, 2021 13:35
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

@flash1293
Copy link
Contributor

flash1293 commented Dec 31, 2021

On dashboard there’s also a csv export action which isn’t fixed by this pr. Can we find a solution to fix both places in the same way?

@dej611
Copy link
Contributor Author

dej611 commented Dec 31, 2021

I think I've seen that already

On dashboard there’s also a csv export action which isn’t fixed by this pr. Can we find a solution to fix both places in the same way?

I had a look at that, but I see no particular way to get this type of meta information from outside Lens editor.
Maybe with #118516 some more informations can be extracted from the datatab le itself and perform this type of filtering at download level.

@flash1293
Copy link
Contributor

Maybe we can introduce an expression function to filter all columns except the ones we need as a last step of the datasource expression

@dej611
Copy link
Contributor Author

dej611 commented Dec 31, 2021

That would make it work also for the inspector download/table view.

@dej611
Copy link
Contributor Author

dej611 commented Jan 3, 2022

@elasticmachine merge upstream

@flash1293
Copy link
Contributor

That would make it work also for the inspector download/table view.

Right, this seems like a good thing - everything will be consistent

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
lens 1020.7KB 1021.0KB +350.0B

History

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Lens release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Lens] Inspector and CSV download does not filter partial columns from formula
5 participants