Mongoimport of JSON file

I have a JSON file consisting of about 2000 records. Each record which will correspond to a document in the mongo database is formatted as follows: {jobID:”2597401″, account:”XXXXX”, user:”YYYYY”, pkgT:{“pgi/7.2-5”:{libA:[“libpgc.so”],flavor:[“default”]}}, startEpoch:”1338497979″, runTime:”1022″, execType:”user:binary”, exec:”/share/home/01482/XXXXX/appker/ranger/NPB3.3.1/NPB3.3-MPI/bin/ft.D.64″, numNodes:”4″, sha1:”5a79879235aa31b6a46e73b43879428e2a175db5″, execEpoch:1336766742, execModify: new Date(“Fri May 11 15:05:42 2012”), startTime: new Date(“Thu May 31 15:59:39 2012″), numCores:”64″, sizeT:{bss:”1881400168″,text:”239574″,data:”22504”}}, Each record … Read more

How to use mongoimport to import csv

Trying to import a CSV with contact information: Name,Address,City,State,ZIP Jane Doe,123 Main St,Whereverville,CA,90210 John Doe,555 Broadway Ave,New York,NY,10010 Running this doesn’t seem to add any documents to the database: $ mongoimport -d mydb -c things –type csv –file locations.csv –headerline Trace says imported 1 objects, but firing up the Mongo shell and running db.things.find() doesn’t … Read more