How to import and Export Data using MongoDB compass

What is MongoDB Compass

MongoDB Compass is a powerful GUI for querying, aggregating, and analyzing your MongoDB data in a visual environment. Compass is free to use and source available and can be run on macOS, Windows, and Linux.

You can use MongoDB Compass to import and export data to and from collections. MongoDB Compass supports import and export for both JSON and CSV files. To import or export data to or from a collection, navigate to the detailed collection view by either selecting the collection from the Databases tab or clicking the collection in the left-side navigation.

To Import data

  • Connect to the deployment containing the collection you wish to import data into.
  • Navigate to your desired collection.
  • Click the Add Data dropdown and select Import File.

To Export Data

  • Connect to the deployment containing the collection you wish to export data from
  • Navigate to your desired collection.
  • Click Collection in the top-level menu and select Export Collection.
  • Select document fields to include in your exported file.
  • Choose a file type and export location.
  • Click Export.

Reference
What is MongoDB
https://www.mongodb.com/blog/post/import-export-your-data-with-compass
https://www.mongodb.com/

Leave a Comment

Your email address will not be published. Required fields are marked *