-
Notifications
You must be signed in to change notification settings - Fork 947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to import data into a mongodb database #3
Comments
Hi @Aastha77Gupta , There are 2 different techniques to import datasets into your mongod depending on a file structure. The
Another command is
The Note that the tree view of the exported
The db is exported using the These are just the basic approaches. You can read more about them on the mongodb documentation. Hope this can give you a starting point. |
See new import.sh script in #7 which automates everything. |
I want to read large json files having size around 15gb, how can i read it through mongodb or any method, any one's help will be highly appreciated |
Hi @Aastha77Gupta , To import datasets into a MongoDB database on your local computer, you can follow these steps: 1.Install MongoDB: If you haven't already done so, you'll need to download and install MongoDB on your computer. You can find the download and installation instructions on the MongoDB website. 2.Prepare your data: Make sure that your data is in a format that MongoDB can understand. This usually means that your data is in JSON format, although MongoDB can also handle other formats like CSV or BSON. 3.Start the MongoDB server: Open a terminal window and start the MongoDB server by running the "mongod" command. This will start the MongoDB daemon process in the background. 4. Import your data: Use the "mongoimport" command to import your data into MongoDB. For example, if your data is in a file called "mydata.json" and you want to import it into a database called "mydb" and a collection called "mycollection", you can run the following command:
This will import the data in the "mydata.json" file into the "mydb" database and the "mycollection" collection. |
Hi,
I am just starting to work with the technology. How should I import all the datasets on MongoDB database on my local computer.
Thank You!
The text was updated successfully, but these errors were encountered: