Can we export aggregated data from MongoDB compass 'Aggregation' section after applying the last stage of aggregation? Like we can do it easily using 'export data' option under 'Documents' section and we get options to export it as JSON and CSV. I only see options to export the aggregation code from left side.
You can use MongoDB Compass to import and export data to and from collections. Compass supports import and export for both JSON and CSV files.
As with many other database systems, MongoDB allows you to perform a variety of aggregation operations. These allow you to process data records in a variety of ways, such as grouping data, sorting data into a specific order, or restructuring returned documents, as well as filtering data as one might with a query.
I think the best way is to use the dedicated feature export data (next to "add data" button)
And write here your own query :
Or save the result of all your stage as a view (it creates a new collection with your results) and export the data (as previous pictures):
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With