Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories Atlas
Created by Guest
Created on Apr 21, 2021

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.
  • Attach files
  • Guest
    Apr 22, 2021
    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