导入json文件时出错。
以下是我的错误。
我的Json文件:
{“city”:“ACMAR”,“loc”:[ - 86.51557,33.584132],“pop”:6055,“state”:“AL”,“_ id”:“35004”} {“city”:“ADAMSVILLE”,“loc”:[ - 86.959727,33.588437],“pop”:10616,“state”:“AL”,“_ id”:“35005”} {“city”:“ADGER”,“loc”:[ - 87.167455,33.434277],“pop”:3205,“state”:“AL”,“_ id”:“35006”} {“city”:“KEYSTONE”,“loc”:[ - 86.812861,33.236868],“pop”:14218,“state”:“AL”,“_ id”:“35007”} {“city”:“NEW SITE”,“loc”:[ - 85.951086,32.941445],“pop”:19942,“state”:“AL”,“_ id”:“35010”} {“city”:“ALPINE”,“loc”:[ - 86.208934,33.331165],“pop”:3062,“state”:“AL”,“_ id”:“35014”} {“city”:“ARAB”,“loc”:[ - 86.489638,34.328339],“pop”:13650,“state”:“AL”,“_ id”:“35016”} {“city”:“BAILEYTON”,“loc”:[ - 86.621299,34.268298],“pop”:1781,“state”:“AL”,“_ id”:“35019”} {“city”:“BESSEMER”,“loc”:[ - 86.947547,33.409002],“pop”:40549,“state”:“AL”,“_ id”:“35020”} {“city”:“HUEYTOWN”,“loc”:[ - 86.999607,33.414625],“pop”:39677,“state”:“AL”,“_ id”:“35023”} {“city”:“BLOUNTSVILLE”,“loc”:[ - 86.568628,34.092937],“pop”:9058,“state”:“AL”,“_ id”:“35031”} {“city”:“BREMEN”,“loc”:[ - 87.004281,33.973664],“pop”:3448,“state”:“AL”,“_ id”:“35033”} {“city”:“BRENT”,“loc”:[ - 87.211387,32.93567],“pop”:3791,“state”:“AL”,“_ id”:“35034”} {“city”:“BRIERFIELD”,“loc”:[ - 86.951672,33.042747],“pop”:1282,“state”:“AL”,“_ id”:“35035”} {“city”:“CALERA”,“loc”:[ - 86.755987,33.1098],“pop”:4675,“state”:“AL”,“_ id”:“35040”} {“city”:“CENTERVILLE”,“loc”:[ - 87.11924,32.950324],“pop”:4902,“state”:“AL”,“_ id”:“35042”} {“city”:“CHELSEA”,“loc”:[ - 86.614132,33.371582],“pop”:4781,“state”:“AL”,“_ id”:“35043”} {“city”:“COOSA PINES”,“loc”:[ - 86.337622,33.266928],“pop”:7985,“state”:“AL”,“_ id”:“35044”}
答案 0 :(得分:1)
退出mongo shell!
mongoimport 是一个独立的命令
只需执行第二个命令。
我不是2.6 mongodb,但我认为没有太多的变化