[DOCS-7119] Comment on: "primer/import-data.txt" Created: 09/Feb/16  Updated: 24/Feb/16  Resolved: 09/Feb/16

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Docs Collector User (Inactive) Assignee: Allison Reinheimer Moore
Resolution: Done Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Location: https://docs.mongodb.org/getting-started/shell/import-data/
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.103 Safari/537.36
Referrer: https://www.google.co.in/
Screen Resolution: 1366 x 768
repo: docs
source: import-data


Participants:
Days since reply: 8 years, 1 week, 1 day ago

 Description   

where to put the downloaded json file



 Comments   
Comment by Allison Reinheimer Moore [ 09/Feb/16 ]

The data import example assumes that you're running mongoimport from the directory where you've saved the dataset, which is why we specify it with the --file primer-dataset.json option.

However, you can put the downloaded JSON file wherever you like – you just need to tell mongoimport where to find it by specifying the path in the --file option. If it was in ~/downloads/primer-dataset.json, for example, you could specify:

mongoimport --db test --collection restaurants --drop --file ~/downloads/primer-dataset.json

Generated at Thu Feb 08 07:53:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.