Export results of an aggregation query to csv file
I have created an aggregation pipeline from the aggregation tab of a collection but unable to export the results of that query to a CSV file.
2
votes
Vanu
shared this idea
-
Hi Vanu,
One option would be to $out your query to a new collection and then use mongoexport (a command line utility) to export that to CSV.
I wish we had a more comprehensive suite for your needs here.
-Andrew