我正在尝试使用以下命令将 80 meg JSON 文件加载到 mongodb 中:
mongoimport --db qt --collection cftable --type json --file cftable.json --jsonArray
我从 mongoimport 得到的信息如下:
2014-05-12T14:16:00.338-0500 check 0 0
2014-05-12T14:16:00.338-0500 imported 0 objects
encountered 1 error(s)
这是示例记录的样子 - 其中大约有 65,000 个。没有一个接近 16 毫克。整个文件为 80 MB。有没有一种方法可以让我缩小问题范围?还是我用 mongoimport 叫错了树来做这样的事情?
[
{
"last_name": "Jones",
"first_name": "Johny",
"middle_name": "J.",
"nick_name": "",
"gen_qual": "",
"degree": "Ph.D.",
"specialty": "LabM & Path",
"voting_staff_flag": "1",
"start_date": "Jan 1 1900 12:00:00:000AM",
"end_date": "Dec 31 2599 11:59:00:000PM",
"time_code": "All Day",
"resident_or_fellow_flag": "0",
"smtp_address": "Jones.Johny@mayo.edu",
"per_id": "12345678",
"rank": "Cons",
"committee_member": "Y",
"point_entity": "Somewhere",
"s_last_name": "JONES",
"s_first_name": "JOHNY",
"ALT_IDENTIFIER_1": "JONESJ",
"ALT_IDENTIFIER_2": "MRE2222",
"ALT_IDENTIFIER_3": "SO_ST_02_50-EP",
"ALT_IDENTIFIER_4": "123456",
"campus_name": "Somewhere, Ohio",
"work_locations": [
{
"w_ai": 17395220,
"work_location_sort": 15,
"building": "Rexell Building",
"floor": "2",
"area": "Experimental Pathology",
"pager": "111 or (11)5-5555",
"phone": "(11)9-9999",
"supports": [
{
"support_sort": 0,
"support_desc": " ",
"support_note": " ",
"support_phone": " ",
"support_start_date": "",
"support_end_date": ""
}
]
},
{
"w_ai": 174956,
"work_location_sort": 25,
"building": "Rexell Building",
"floor": "2",
"area": "Laboratory",
"pager": "111 or (11)1-1111",
"phone": "(11)2-2222",
"supports": [
{
"support_sort": 15,
"support_desc": "Medical Secretary",
"support_note": " ",
"support_phone": "(11)6-6666",
"support_start_date": "Jan 1 1900 12:00:00:000AM",
"support_end_date": "Dec 31 2599 12:00:00:000AM"
}
]
}
]
}
'''
]