Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@abelsonlive
Created November 17, 2012 09:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save abelsonlive/4094511 to your computer and use it in GitHub Desktop.
Save abelsonlive/4094511 to your computer and use it in GitHub Desktop.
import csv into mongodb from command line
#!/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