Quiz: Import and Export

problem : Which of the following commands will add a collection that is stored in animals.json to an Atlas cluster?

My Doubt : why the answer is not mongoExport? since the collection of animal.json is saved in the local system and we adding/exporting it to server(atlas cluster).

why does it make sence to import data from server when we need to upload it?

Hi @Sahibjot_Singh, welcome to the community.
Please note that the mongoexport is a command-line tool that produces a JSON or CSV export of data stored in a MongoDB instance. That means it will export all your collection data into a file that will be saved in your local system.

On the other hand, the mongoimport tool imports content from an Extended JSON, CSV, or TSV export created by mongoexport , or potentially, another third-party export tool. So it will take the same file as input from your local system and will add all the data into the specified collection & database respectively.

I hope it helps.

In case you have any doubts, please feel free to reach out to us.

Thanks and Regards.
Sourabh Bagrecha,
Curriculum Services Engineer