Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Uploading Master Data in MongoDB Atlas

DZone's Guide to

Uploading Master Data in MongoDB Atlas

Read this short tutorial that includes informational pictures in order to learn more about how to efficiently upload master data into MongoDB Atlas.

Free Resource

Compliant Database DevOps and the role of DevSecOps DevOps is becoming the new normal in application development, and DevSecOps is now entering the picture. By balancing the desire to release code faster with the need for the same code to be secure, it addresses increasing demands for data privacy. But what about the database? How can databases be included in both DevOps and DevSecOps? What additional measures should be considered to achieve truly compliant database DevOps? This whitepaper provides a valuable insight. Get the whitepaper

We hope you already have a MongoDB Atlas instance and you need to import master data in your collections.

Before you can import data, you need to whitelist your IP and create a user that has read/write permissions through the security tab.

Image title

MongoImport

MongoImport can be used to import data from json , csv, or tsv file.

To fire MongoImport command, traverse to the path where you have installed MongoDB on local:

Image title

Command to Be Used on windows:

C:\Program Files\MongoDB\Server\3.4\bin>mongoimport --host dzone-shard-00-00-abcde.mongodb.net:27017 --ssl --authenticationDatabase admin --username <userName> --password <password> --db testDB --collection Test --file C:\DZone\Test.json --jsonArray

Note : Please replace host , userName , password , db, and collection.

MongoFiles

The MongoFiles utility makes it possible to manipulate files stored in your MongoDB instance in GridFS objects from the command line. It is particularly useful as it provides an interface between objects stored in your file system and GridFS.

Command to Be Used on Windows:

C:\Program Files\MongoDB\Server\3.4\bin>mongofiles --host dzone-shard-00-00-abcde.mongodb.net:27017 --ssl --authenticationDatabase admin --username <userName> --password <password> --db <DB> -l C:\DZone\Test.pdf put Test.pdf

Note : Please replace host , userName , password , db, and collection.

Compliant Database DevOps and the role of DevSecOps DevOps is becoming the new normal in application development, and DevSecOps is now entering the picture. By balancing the desire to release code faster with the need for the same code to be secure, it addresses increasing demands for data privacy. But what about the database? How can databases be included in both DevOps and DevSecOps? What additional measures should be considered to achieve truly compliant database DevOps? This whitepaper provides a valuable insight. Get the whitepaper

Topics:
database ,mongodb atlas ,json ,csv ,mongodb

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}