Exporting a table with many many fields from the original csv

Hi,
I have a csv file something like this:

start-time,end-time,name,surname,age,address,distance-foot,distance-bike
10:03:34 day1,10:54:32 day1,john,smith,25,somestreet,5,25
...
17:23:01 day1, 18:10:10 day1,john, smith,25,somestreet,10,10
...

and I want to group by slots of 1 day, where I sum the values of the distance, and them apply some filters in kibana (for example, i may want to choose only people named john or with ages between 28 and 32). (A)
Finally I want to export my table with all the fields, a possible result would be:
day1, john,smith,25,somestreet,15,35

I can do everything up to point (A), but can someone help me with the exportation of the table? I only can export the table with the values that I defined in the buckets or sub-buckets, all the others are left out of my table

Thank you!

The export CSV feature simply exports what is in the data table, so if you'd like the date and name to be in the resulting CSV, you'd have to include them as buckets in the visualization.

You could create a terms aggregation and aggregate by name. Then, when you filter by name, the name would still be in the resulting data table, and in the export as well.

Hope this helps!

You mean that if i want 15 fields in my export table I must have 15 buckets?

Thanks

Unless the fields are metrics, then yes, you'd have to create an aggregation for each field in the table.

Got it, thank you