If you already have data in ES, you can get a lot of data from queries but sometimes the complex return structure is annoying to deal with.
This example shows how to turn a complex query result into a csv.
- example_mapping_template.json shows the structure of the data stored in elasticsearch
- parsing_example.sh shows how to make a complex query against this data and parse the result into a csv
- example_output.csv shows sample csv output