Last active
October 12, 2015 21:39
-
-
Save raineorshine/9513584 to your computer and use it in GitHub Desktop.
3 common use cases for mongoimport
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{ | |
"name": "Raine" | |
}, | |
{ | |
"name": "Chris" | |
}, | |
{ | |
"name": "Gene" | |
}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"name": "Raine"} | |
{"name": "Chris"} | |
{"name": "Gene"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name | age | |
---|---|---|
Raine | 400 | |
Chris | 397 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mongoimport -d mongoimportTest -c users < multiline.txt --jsonArray | |
mongoimport -d mongoimportTest -c users < singleline.txt | |
mongoimport -d mongoimportTest -c users < spreadsheet.csv --type csv --headerline |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment