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] Inspector and CSV download does not filter partial columns from formula #121063

Closed
dej611 opened this issue Dec 13, 2021 · 7 comments · Fixed by #128297
Closed

[Lens] Inspector and CSV download does not filter partial columns from formula #121063

dej611 opened this issue Dec 13, 2021 · 7 comments · Fixed by #128297
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Lens impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@dej611
Copy link
Contributor

dej611 commented Dec 13, 2021

Describe the bug:

Partial columns (hidden, generated by the formula's feature) are exported and downloaded in the CSV file generated.

Steps to reproduce:

  1. Create a Lens XY chart with a formula like unique_values( fieldA ) / count()
  2. Download the CSV
  3. 3 columns for unique_values( fieldA ) will be present as Part-of X , together with the final formula column (all with the same colum name)

Expected behavior:

Part-of but in general hidden columns should be removed from the export.
Eventually, it can be considered to let partial results be downloaded as an extra feature, but only on user's request and with a better column description.

@dej611 dej611 added bug Fixes for quality problems that affect the customer experience Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Dec 13, 2021
@elasticmachine
Copy link
Contributor

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

@flash1293 flash1293 added the impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. label Dec 13, 2021
@dej611 dej611 self-assigned this Dec 21, 2021
@dej611 dej611 removed their assignment Jan 3, 2022
@flash1293
Copy link
Contributor

@ghudgins Discussed with the app services team how to solve this and we have a good plan, but there is one product question related to this - do we want to offer a "mode" for Inspect view and/or CSV export to include these intermediary columns? Or should we just always filter them? I'm leaning towards filtering them at all times to keep things simple - what do you think?

Technically, Lens should handle this like Visualize charts - the vis expression function should use its vis-specific knowledge to only register the actually needed columns in the inspector adapter.

@ghudgins
Copy link
Contributor

I'm leaning towards filtering them at all times to keep things simple - what do you think?

agreed - I wouldn't expect the intermediate columns in the output as a user. keep it simple seems like the right call here...can always reconsider in the "more complexity" direction a lot easier than the other way around

@flash1293
Copy link
Contributor

Sounds good - cc @dej611 we know how to proceed in this case. This is how all of the vis functions should do it (including the Lens ones):

@mbondyra mbondyra changed the title [Lens] CSV download does not filter partial columns from formula [Lens] Inspector and CSV download does not filter partial columns from formula Feb 25, 2022
@flash1293
Copy link
Contributor

@alexwizp I think #126786 is also fixing this one, right?

@zakwanhaj
Copy link

I have the same problem. It's very annoying. I hope you can include it in the short term plan and that it will be fixed soon.

@flash1293
Copy link
Contributor

@zakwanhaj Actually I opened a PR yesterday that will fix this issue: #128297

It will be released with the next upcoming version 8.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Lens impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
6 participants