Created
November 17, 2012 09:36
-
-
Save abelsonlive/4094511 to your computer and use it in GitHub Desktop.
import csv into mongodb from command line
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
#!/usr/bin/bash | |
## include --upsert if adding to a prexistitng collection | |
mongoimport -d db_name -c coll_name --type csv --file file.csv --headerline |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment