MongoImport behave unnatural

84 views
Skip to first unread message

Annee

unread,
Apr 21, 2014, 2:20:58 AM4/21/14
to mongod...@googlegroups.com
Hi Mongo Team,
I am facing wierd issue while using mongoDB.

I genarate a Data in Mysql with 21 columns and 103259200 rows. I create a csv file from Mysql Database and load this CSV successfully in another table in mysql with 103259200 rows, but when i tried to import same csv in mongodb it completed successfully with 56176268 objects. No error thrown . I also face same issue 2 days back.

My System congiration.
OS : Linux 
RAM :64 GB
Arch: 64 Bit
MongoDB : 2.4 

i start with mongod :
./bin/mongod --dbpath=/dbdata/mongodb --logpath=/dbdata/mongodb/mongodb.log --logappend --nojournal --fork

mongo import cmd:
mongoimport -d mymongo -c MyMongo --type csv --file /tmp/city24load100M_1.csv --fields auto_id,id,name,ascii_name,alternate_names,lat,lon,feature_class,feature_code,cou
ntry_code,country_code2,admin1_code,admin2_code,admin3_code,admin4_code,population,elevation,dem,timezone,mod_date,insert_time

Please help , why mongo loose half of record from CSV.

Thanks

Asya Kamsky

unread,
Apr 21, 2014, 2:24:52 AM4/21/14
to mongod...@googlegroups.com
What do the mongod logs say?
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/dd46e5bf-046d-41af-998b-ab56b6c370f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Annee

unread,
Apr 21, 2014, 2:38:28 AM4/21/14
to mongod...@googlegroups.com
Hi Asya,

Thanks for prompt response. I am  checking the log, but it says nothing unusal, log is attached. One more run the mongoimport through normal user not by mongod user. IS this is the reason for this behaviour ?
Please guide me, what i do.

Thanks
Amit 


On Monday, 21 April 2014 11:54:52 UTC+5:30, Asya Kamsky wrote:
What do the mongod logs say?

On Sunday, April 20, 2014, Annee <master.a...@gmail.com> wrote:
Hi Mongo Team,
I am facing wierd issue while using mongoDB.

I genarate a Data in Mysql with 21 columns and 103259200 rows. I create a csv file from Mysql Database and load this CSV successfully in another table in mysql with 103259200 rows, but when i tried to import same csv in mongodb it completed successfully with 56176268 objects. No error thrown . I also face same issue 2 days back.

My System congiration.
OS : Linux 
RAM :64 GB
Arch: 64 Bit
MongoDB : 2.4 

i start with mongod :
./bin/mongod --dbpath=/dbdata/mongodb --logpath=/dbdata/mongodb/mongodb.log --logappend --nojournal --fork

mongo import cmd:
mongoimport -d mymongo -c MyMongo --type csv --file /tmp/city24load100M_1.csv --fields auto_id,id,name,ascii_name,alternate_names,lat,lon,feature_class,feature_code,cou
ntry_code,country_code2,admin1_code,admin2_code,admin3_code,admin4_code,population,elevation,dem,timezone,mod_date,insert_time

Please help , why mongo loose half of record from CSV.

Thanks

--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@googlegroups.com.
mongod.log

Asya Kamsky

unread,
Apr 21, 2014, 6:42:56 PM4/21/14
to mongodb-user
It's possible that some (many) of the rows were not "properly" formed or had some other issue being inserted - can you provide two or three sample lines from the csv file please?

Asya



To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.

To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.

Asya Kamsky

unread,
Apr 21, 2014, 6:44:48 PM4/21/14
to mongodb-user
One more question - do you have any indexes already created on MyMongo collection?

Asya

Annee

unread,
Apr 21, 2014, 11:41:34 PM4/21/14
to mongod...@googlegroups.com
Hi Asya,

Again Thanks for your reply. I paste a first 40 lines of CSV. There is no index on collection MyMongo.

 show tables;
MyMongo
system.indexes
> db.system.indexes.find()
{ "v" : 1, "name" : "_id_", "key" : { "_id" : 1 }, "ns" : "mymongo.MyMongo" }


CSV Records.


1,3039154,El Tarter,El Tarter,Ehl Tarter\,Эл Тартер,42.5795200,1.6536200,P,PPL,AD,,02,,,,1052,0,1721,Europe/Andorra,2012-11-03,2014-04-11 09:56:18
2,3039163,Sant Julià  de Lòria,Sant Julia de Loria,San Julia\,San Julià \,Sant Julia de Loria\,Sant Julià  de Lòria\,Sant-Zhulija-de-Lorija\,sheng hu li ya-de luo li ya\,Сант-ЖулиÑ�-де-ЛориÑ�\,サン・ジュリア・デ・ロリア教区\,圣胡利娅-德洛里亚\,圣胡利娅ï¼�德洛里亚,42.4637200,1.4912900,P,PPLA,AD,,06,,,,8022,0,921,Europe/Andorra,2013-11-23,2014-04-11 09:56:18
3,3039604,Pas de la Casa,Pas de la Casa,Pas de la Kasa\,Па� де ла Ка�а,42.5427700,1.7336100,P,PPL,AD,,03,,,,2363,2050,2106,Europe/Andorra,2008-06-09,2014-04-11 09:56:18
4,3039678,Ordino,Ordino,Ordino\,ao er di nuo\,orudino jiao qu\,Ордино\,オルディノ教区\,奥尔迪诺,42.5562300,1.5331900,P,PPLA,AD,,05,,,,3066,0,1296,Europe/Andorra,2009-12-11,2014-04-11 09:56:18
5,3040051,les Escaldes,les Escaldes,Ehskal'des-Ehndzhordani\,Escaldes\,Escaldes-Engordany\,Les Escaldes\,esukarudesu=engorudani jiao qu\,lai sai si ka er de-en ge er da\,Э�кальде�-Энджордани\,エスカルデス�エンゴルダニ教区\,�塞斯�爾德-�戈爾�\,�塞斯�爾德��戈爾�,42.5072900,1.5341400,P,PPLA,AD,,08,,,,15853,0,1033,Europe/Andorra,2008-10-15,2014-04-11 09:56:18
6,3040132,la Massana,la Massana,La Macana\,La Massana\,La Maçana\,La-Massana\,la Massana\,ma sa na\,Ла-Ма��ана\,ラ・マサナ教区\,马�纳,42.5449900,1.5148300,P,PPLA,AD,,04,,,,7211,0,1245,Europe/Andorra,2008-10-15,2014-04-11 09:56:18
7,3040686,Encamp,Encamp,Ehnkam\,Encamp\,en kan pu\,enkanpu jiao qu\,Энкам\,エンカンプ教区\,��普,42.5347400,1.5801400,P,PPLA,AD,,03,,,,11223,0,1257,Europe/Andorra,2012-04-13,2014-04-11 09:56:18
8,3041204,Canillo,Canillo,Canillo\,Kanil'o\,ka ni e\,kaniryo jiao qu\,Канильо\,カニーリョ教区\,�尼略,42.5676000,1.5975600,P,PPLA,AD,,02,,,,3292,0,1561,Europe/Andorra,2012-12-24,2014-04-11 09:56:18
9,3041519,Arinsal,Arinsal,Arinsal\,�рин�ал,42.5720500,1.4845300,P,PPL,AD,,04,,,,1419,0,1465,Europe/Andorra,2010-01-29,2014-04-11 09:56:18
10,3041563,Andorra la Vella,Andorra la Vella,ALV\,Ando-la-Vyey\,Andora\,Andora la Vela\,Andora la Velja\,Andora lja Vehl'ja\,Andoro Malnova\,Andorra\,Andorra Tuan\,Andorra a Vella\,Andorra la Biella\,Andorra la Vella\,Andorra la Vielha\,Andorra-a-Velha\,Andorra-la-Vel'ja\,Andorra-la-Vielye\,Andorre-la-Vieille\,Andò-la-Vyèy\,Andòrra la Vièlha\,an dao er cheng\,andolalabeya\,andwra la fyla\,ΑνδόÏ�Ï�α\,Ð�ндора ла ВелÑ�\,Ð�ндора ла Веља\,Ð�ндора лÑ� Ð’Ñ�льÑ�\,Ð�ндорра-ла-ВельÑ�\,×�× ×“×•×¨×” לה וולה\,أندورا لا Ù�يلا\,አንዶራ ላ ቬላ\,アンドラ・ラ・ヴェリャ\,安é�“爾城\,안ë�„ë�¼ë�¼ë² 야,42.5077900,1.5210900,P,PPLC,AD,,07,,,,20430,0,1037,Europe/Andorra,2010-05-30,2014-04-11 09:56:18
11,290594,Umm al Qaywayn,Umm al Qaywayn,Um al Quweim\,Umm al Qaiwain\,Umm al Qawain\,Umm al Qaywayn\,Umm-ehl'-Kajvajn\,Yumul al Quwain\,am alqywyn\,Умм-�ль-Кайвайн\,أم القيوين,25.5647300,55.5551700,P,PPLA,AE,,07,,,,44411,0,2,Asia/Dubai,2012-11-03,2014-04-11 09:56:18
12,291074,Ras al-Khaimah,Ras al-Khaimah,Julfa\,Khaimah\,RKT\,Ra's al Khaymah\,Ras al Khaima\,Ras al Khaimah\,Ras al-Khaimah\,Ras-ehl'-Khajma\,Ra’s al Khaymah\,R�s al Khaima\,ras alkhymt\,Ра�-�ль-Хайма\,رأس الخيمة,25.7895300,55.9432000,P,PPLA,AE,,05,,,,115949,0,2,Asia/Dubai,2013-11-26,2014-04-11 09:56:18
13,291279,Muzayri‘,Muzayri`,Mezaira'a\,Mezaira’a\,Mizeir`ah\,Mizeir‘ah\,Mozayri`\,Mozayri‘\,Muzairi\,Muzayri`\,Muzayri‘\,Музаири,23.1435500,53.7881000,P,PPL,AE,,01,,,,10000,0,123,Asia/Dubai,2013-10-24,2014-04-11 09:56:18
14,291696,Khawr Fakk�n,Khawr Fakkan,Fakkan\,Fakk�n\,Khawr Fakkan\,Khawr Fakk�n\,Khawr al Fakkan\,Khawr al Fakk�n\,Khor Fakhan\,Khor Fakkan\,Khor Fakk�n\,Khor al Fakhan\,Khor al Fakkan\,Khor al F�kh�n\,Khor'fakkan\,Khor-Fakkan\,Khorfakan\,Khorfakhan\,Port Khor Fakkan\,Хор-Факкан,25.3313200,56.3419900,P,PPL,AE,,06,,,,33575,0,20,Asia/Dubai,2013-10-25,2014-04-11 09:56:18
15,292223,Dubai,Dubai,DXB\,Dabei\,Dibai\,Dibay\,Doubayi\,Dubae\,Dubai\,Dubai emiraat\,Dubaija\,Dubaj\,Dubajo\,Dubajus\,Dubay\,Dubayy\,Dubaï\,Dubái\,Dúbæ\,Ehmirat Dubaj\,Fort Dabei\,Ntoumpai\,dby\,dbyy\,di bai\,dobai\,du bai\,duba'i\,dubai\,dubay\,dubi\,dwbyy\,tupai\,�τουμπάι\,Дубаи\,Дубай\,Эмірат Дубай\,Դուբայի Էմիրություն\,דוב�י\,דוביי\,دبئی\,دبى\,دبي\,دبی\,دوبەی\,دۇبائى\,द�बई\,দ�বাই\,த�பை\,ద�బాయ�\,ದ�ಬೈ\,ദ�ബായ�\,ดูไบ\,დუბ�ი\,ド�イ\,�拜\,迪拜\,�바�,25.2581700,55.3047200,P,PPLA,AE,,03,,,,1137347,0,11,Asia/Dubai,2012-08-19,2014-04-11 09:56:18
16,292239,Dib�,Diba,Daba\,Daba al-Hisn\,Dab�\,Dab� al-Ḥiṣn\,Diba\,Diba al Hisn\,Dibah\,Dibba\,Dibba Al'-Khisn\,Dibbah\,Dib�\,Dib� al Ḩişn\,Dīb� al Ḩişn\,Hisn Diba\,Husn Dibba\,Дибба �ль-Хи�н\,Ḩişn Dib�,25.6195500,56.2729100,P,PPL,AE,,04,,,,26395,0,4,Asia/Dubai,2013-07-06,2014-04-11 09:56:18
17,292672,Sharjah,Sharjah,Al Sharjah\,Ash 'Mariqah\,Ash Shariqa\,Ash Shariqah\,Ash Sh�riqa\,Ash Sh�riqah\,Ash ’Mariqah\,Ash-Shariqah emiraat\,Ash-Sh�riqah emiraat\,Charjah\,Ch·ardj·a\,Ehmirat Shardzha\,SHJ\,Sardza\,Sarjo\,Schardscha\,Shardza\,Shardzha\,Sharga\,Sharijah\,Shariqah\,Sharja\,Sharjah\,Sh�rijah\,Sh�riqah\,Sh�rja\,Szardza\,Szardża\,Xarja\,Xarjah\,alsharqt\,amart alsharqt\,carja\,rath charc ah\,sarajaha\,sarja\,sharjh\,sharuja\,syaleuja\,sʼrgh\,xia er jia\,Ŝarĵo\,Šardža\,Šardžá\,Шарджа\,Шарџа\,Эмірат Шарджа\,Շարժայի Էմիրություն\,ש�רגה\,إمارة الشارقة\,الشارقة\,شارجه\,شارج�\,शारजाह\,சார�ஜா\,ಶಾರ�ಜ\,ഷാർജ\,รั�ชาร์จาห์\,シャールジャ\,�尔迦\,샤르�,25.3373700,55.4120600,P,PPLA,AE,,06,,,,543733,0,6,Asia/Dubai,2013-03-05,2014-04-11 09:56:18
18,292688,Ar Ruways,Ar Ruways,Ar Ru'ays\,Ar Ruways\,Ar Ru’ays\,Ar-Ruvais\,Ruwais\,�р-Руваи�,24.1102800,52.7305600,P,PPL,AE,AE,01,,,,16000,0,16,Asia/Dubai,2012-11-03,2014-04-11 09:56:18
19,292878,Al Fujayrah,Al Fujayrah,Al Fujayrah\,Al-Fudjayra\,Al-Fujayrah' emiraat\,Fudschaira\,Fudzhejra\,Fujaira\,Fujairah\,Fujajro\,Fujayrah\,Fuĵajro\,alfjyrt\,fjyrt\,fu ji la\,fujaira\,Фуджейра\,ال�جيرة\,�جيرة\,フジャイラ\,富�拉,25.1164100,56.3414100,P,PPLA,AE,,04,,,,62415,0,15,Asia/Dubai,2012-01-18,2014-04-11 09:56:18
20,292913,Al Ain,Al Ain,AAN\,Ainas\,Al Ain\,Al Ajn\,Al Ayn\,Al `Ayn\,Al ‘Ayn\,Al'-Ajn\,Al-Ain\,Al-Ajn\,Al-Ayin\,Al-Ayn\,Al-Aïn\,ai yin\,al eyin\,al-ain\,al-aini\,alÊ¿yn  abwzby\,Ð�ль-Ð�йн\,Ô±Õ¬-Ô±ÕµÕ«Õ¶\,×�ל-עין\,العين، أبوظبي\,العین\,அலà¯� எயினà¯�\,അൽ à´�ൻ\,áƒ�ლ-áƒ�ინი\,アル・アイン\,è‰¾å› \,알아ì�¸,24.1916700,55.7605600,P,PPL,AE,,01,,,,408733,0,275,Asia/Dubai,2013-03-17,2014-04-11 09:56:18
21,292932,Ajman,Ajman,Ajman\,Al Ajman\,QAJ\,Ujman\,ʿjman\,عجمان,25.4111100,55.4350400,P,PPLA,AE,,02,,,,226172,0,4,Asia/Dubai,2013-03-24,2014-04-11 09:56:18
22,292953,Adh Dhayd,Adh Dhayd,Adh Dhaid\,Adh Dhayd\,Al Daid\,Al-Dhayd\,Dayd\,Dhaid\,Dhayd\,Duhayd\,Ihaid\,aldhyd\,الذيد\,�ayd,25.2881200,55.8815700,P,PPL,AE,,06,,,,24716,0,114,Asia/Dubai,2012-01-18,2014-04-11 09:56:18
23,292968,Abu Dhabi,Abu Dhabi,AEbu Saby\,AUH\,Aboe Dhabi\,Abou Dabi\,Abu Dabi\,Abu Dabis\,Abu Daby\,Abu Daibi\,Abu Dhabi\,Abu Dhabi emiraat\,Abu Zabi\,Abu Zaby\,Abu Zabye\,Abu Zabyo\,Abu Ḍabi\,Abu �abi\,Abu-Dabi\,Abu-Dabi khot\,Abu-Dabio\,Abu-Dzabi\,Abud Dhabi\,Abú Dabí\,Abú Daibí\,Abú Dhabí\,Abú Zabí\,Abû Daby\,Abū Dabī\,Abū Z̧aby\,Abū Z̧abye\,Abū Z̧abyo\,Abū Z̧abī\,Ampou Ntampi\,Gorad Abu-Dabi\,a bu zha bi\,abu dhabi\,abu-zabi\,abudabi\,abudhabi\,abwzby\,aputapi\,xa bud abi\,Äbu Saby\,�bu-Dabi\,Αμπου �ταμπι\,Αμπο� �τάμπι\,�бу Даби\,�бу-Даби\,�бу-Даби хот\,�бу-Дабі\,Горад �бу-Дабі\,Әбү-Дәби шәһәре\,Աբու Դաբի\,�בו ד�בי\,أبوظبي\,ئەبووزەبی\,ابوظبی\,ابوظ�بی\,अब� धाबी\,अबू धाबी\,আব�ধাবি\,ਅਬੂ ਧਾਬੀ\,ଆବ�ଧାବି\,அப�தாபி\,ಅಬ� ಧಾಬಿ\,അബ�ദാബി\,අබුඩ�බි\,อาบูดาบี\,ཨ་པོའུ་དྷ་པེ�\,အဘူဒါဘီမြို့\,�ბუ-ზ�ბი\,አቡ ዳቢ\,アブダビ\,阿布扎比\,아부다비,24.4666700,54.3666700,P,PPLC,AE,,01,,,,603492,0,6,Asia/Dubai,2012-01-18,2014-04-11 09:56:18
24,1120471,Zorkot,Zorkot,Vulusvali-Zorkot\,Woludwali Zorkot\,Woludw�lī Z�ṟk�t\,Woluswali Zorkot\,Woluswali Zurkowt\,Woluswalī Zūrkowt\,Wolusw�lī Z�ṟk�t\,Wuleswali Zor Kot\,Wulêsw�lī Z�r K�ṯ\,Zarkot\,Zor Kot\,Zorkot\,Zowr Kowt\,Zowṟ Kowṯ\,Zur Kowt\,Zurkot\,Z�r K�ṯ\,Zūr Kowṯ\,Zūrk�t\,زور کوټ,33.5414900,69.7344600,P,PPLA2,AF,,37,,,,0,0,1845,Asia/Kabul,2013-04-03,2014-04-11 09:56:18
25,1120473,Wulêsw�lī Bihsūd,Wuleswali Bihsud,Behsud\,Behsūd\,Markaz-e Bihsud\,Markaz-e Bihsūd\,Olusvali Behsowd\,Olusv�lī Behsowd\,Oluswali Behsud\,Olusw�lī Behsū�\,Ulusvali-Bikhsud\,Wuleswali Bihsud\,Wuluswali Bihsud\,Wulusw�lī Bihsūd\,Wulêsw�lī Bihsūd\,mrkz bhswd\,wlswaly bhswd\,مرکز بهسود\,ولسوالی بهسود,34.3436000,67.9056700,P,PPLA2,AF,,27,,,,0,0,2960,Asia/Kabul,2012-08-04,2014-04-11 09:56:18
26,1120483,Kuhs�n,Kuhsan,Kohistan\,Kohsan\,Kohs�n\,Koshan\,Kuhestan\,Kuhsan\,Kuhs�n\,K�hist�n\,Kūhest�n\,khsan\,kwhstan\,Кошан\,کهسان\,کوهستان,34.6538900,61.1977800,P,PPLA2,AF,,11,,,,12087,0,740,Asia/Kabul,2012-05-05,2014-04-11 09:56:18
27,1120484,L�sh,Lash,Kohestan\,Kohest�n\,Laorlash\,Laorlush\,Las\,Lash\,Las̄\,Laurlas\,Laurlash\,Lawlas\,Lawlash\,Lawl�sh\,Lawl�s̄\,Lowlash\,Lowl�sh\,Lowr Lash\,Lowr L�sh\,L�orlash\,L�orlush\,L�sh\,lash\,lwlash\,لاش\,لولاش,35.3782000,64.7745700,P,PPLA2,AF,,07,,,,0,0,1927,Asia/Kabul,2012-02-28,2014-04-11 09:56:18
28,1120487,Tukz�r,Tukzar,Kala Sangcharak\,Kala Sangch�rak\,Qal`eh Sangcharek\,Qala Sangcharak\,Qal‘eh Sangch�rek\,Sangcarak\,Sangcharak\,Sangc�rak\,Takzar\,Tokzar\,Tokz�r\,Tuksar\,Tukzar\,Tukz�r\,T�kz�r\,Tūkz�r\,tkzar\,twkzar\,Токзар\,توکزار\,تکزار,35.9483100,66.4213200,P,PPLA2,AF,,33,,,,12021,0,1210,Asia/Kabul,2012-02-28,2014-04-11 09:56:18
29,1120500,Mīray,Miray,Miray\,Miri\,Miṟay\,Mīray\,Mīrī\,Salgar\,Shalgar\,S̄algaṟ\,myry\,ميری,33.3246200,68.4406800,P,PPLA2,AF,,08,,,,0,0,2077,Asia/Kabul,2013-03-05,2014-04-11 09:56:18
30,1120501,Āq Kupruk,Aq Kupruk,Ak Kuprak\,Ak Kupruk\,Aq Kubruk\,Aq Kupruk\,Keshendah\,Keshende\,Keshendeh\,Keshindeh\,Keshīndeh\,aq kbrk\,aq kprk\,Āq Kubruk\,Āq Kupruk\,آق کبرک\,آق کپرک,36.0835200,66.8402900,P,PPLA2,AF,,30,,,,0,0,719,Asia/Kabul,2012-02-28,2014-04-11 09:56:18
31,1120543,Zurmat,Zurmat,Bazar-e Zurmat\,B�z�r-e Zurmat\,Zarmal\,Zormat\,Zurmat\,Zuṟmat\,bazar zrmt\,zrmt\,بازار زرمت\,زرمت,33.4377800,69.0277400,P,PPLA2,AF,,36,,,,0,0,2150,Asia/Kabul,2012-02-28,2014-04-11 09:56:18
32,1120616,Zayb�k,Zaybak,Zaybak\,Zayb�k\,Zebak\,Zeybak\,Zeyb�k\,Zibak\,Zēb�k\,Zīb�k\,zybak\,زیباک,36.5294700,71.3441000,P,PPLA2,AF,,01,,,,0,0,2620,Asia/Kabul,2013-12-09,2014-04-11 09:56:18
33,1120627,Zī�rat-e Sh�h Maqşūd,Ziarat-e Shah Maqsud,Sah Agha\,Shab Maqsud\,Shah Agha\,Shah Maksud\,Shah Maqsud\,Shakhaga\,Sh�b Maqsūd\,Sh�h Maqsūd\,Sh�h Āgh�\,Ziarat Shah Maqsud\,Ziarat-Shakh-Maksud\,Ziarat-e Shah Maqsud\,Zi�rat Sh�h Maqsūd\,Zyarate Sah Maqsud\,Zy�rate Š�h Maqsūd\,Zī�rat-e Sh�h Maqşūd\,shah agha\,zyart shah mqswd\,Šah Āgh�\,زيارتٔ شاه مقصود\,زیارت شاه مقصود\,شاه آغا,31.9848000,65.4736000,P,PPLA2,AF,,23,,,,0,0,1577,Asia/Kabul,2012-02-28,2014-04-11 09:56:18
34,1120711,Zindah J�n,Zindah Jan,Fusanj\,Fushanj\,Fus̄anj\,Fūshanj\,Zendajan\,Zendeh Jan\,Zendeh J�n\,Zen�aj�n\,Zindah Jan\,Zindah J�n\,Zindajan\,Zindaj�n\,zndh jan\,زنده جان,34.3426400,61.7467500,P,PPLA2,AF,,11,,,,10104,0,834,Asia/Kabul,2012-02-28,2014-04-11 09:56:18
35,1120863,Zarghūn Shahr,Zarghun Shahr,Katawaz\,Kat�w�z\,Khayr Kot\,Khayr Kut\,Khayr Kūṯ\,Khayṟ Kot\,Zaraghun Sahr\,Zaraghūn S̄ahr\,Zarghun Sahr\,Zarghun Shahr\,Zarghūn Shahr\,Zargun Shahr\,Zargunsahr\,Zaṟghun Sahr\,Zaṟgūns̄ahr\,zrghwn shhr\,زرغون شهر,32.8473400,68.4457300,P,PPL,AF,,29,,,,13737,0,2120,Asia/Kabul,2012-01-16,2014-04-11 09:56:18
36,1120879,Zaṟah Sharan,Zarah Sharan,Sharan\,Sharnah\,Sherana\,Sheranna\,Zara Saran\,Zara Šaran\,Zara-Sharan\,Zarah Sharan\,Zareh Sharan\,Zaṟah Sharan\,زړه شرن,33.1464100,68.7921300,P,PPL,AF,,29,,,,7366,0,2153,Asia/Kabul,2014-02-06,2014-04-11 09:56:18
37,1120985,Zaranj,Zaranj,ZAJ\,Zaranas\,Zarang\,Zarani\,Zaranj\,Zhazang\,zrnj\,Зарани\,زرنج,30.9596200,61.8603700,P,PPLA,AF,,19,7053297,,,49851,0,489,Asia/Kabul,2013-10-06,2014-04-11 09:56:18
38,1121045,Zamt� Kêlay,Zamto Kelay,Zamto\,Zamto Kalay\,Zamto Kelay\,Zamtukalay\,Zamt�\,Zamt� Kêlay\,zmtw\,zmtw kly\,زمتو\,زمتو کلی,32.3726000,66.1770800,P,PPLA2,AF,,23,,,,0,0,1925,Asia/Kabul,2012-02-28,2014-04-11 09:56:18
39,1121271,Yangī Qal‘ah,Yangi Qal`ah,Yangi Kala\,Yangi Qal`ah\,Yangi Qal`eh\,Yangi Qala\,Yangī Qal‘ah\,Yangī Qal‘eh\,Yengi Qal`eh\,Yengī Qal‘eh\,ینگی قلعه,37.4657200,69.6113100,P,PPL,AF,,26,,,,6541,0,471,Asia/Kabul,2012-01-16,2014-04-11 09:56:18
40,1121418,Yaḩyá Khēl,Yahya Khel,Ya Khel\,Yahya Khel\,Yahya Kheyl\,Yahyakhel\,Yakh'yakheyl'\,Yakh’yakheyl’\,Yaḩyá Khēl\,Yaḩy� Kheyl\,Yaḩy�khēl\,Yehyakhel\,Yeḩy�khēl\,یحیى خ�ل,32.9374200,68.6462200,P,PPLA2,AF,,29,,,,0,0,2136,Asia/Kabul,2012-02-28,2014-04-11 09:56:18

Thanks 
Amit Patel

Annee

unread,
Apr 22, 2014, 2:52:18 AM4/22/14
to mongod...@googlegroups.com
Hi Asya,

Thanks for your help, finally i sort out the error why record are missing, it is due to CSV problem, which I create from mysql. Now i change whole data in mysql table , again create a new CSV. But when i import it into mongo. It throw different error.

All are attached, please try to solve this.

Thanks 
Amit 
40_rows.txt

Asya Kamsky

unread,
Apr 22, 2014, 3:04:05 AM4/22/14
to mongod...@googlegroups.com
Looks like some (many) of the records are too large - MongoDB documents are limited to 16MBs.

Asya

Annee

unread,
Apr 22, 2014, 3:16:16 AM4/22/14
to mongod...@googlegroups.com
How can i sort out those rows because mysql doesn't show any error.

Mongo error
Tue Apr 22 06:29:36.317 Assertion: 10334:BSONObj size: 22587586 (0xC2A85801) is invalid. Size must be between 0 and 16793600(16MB) First element: auto_id: 96043
0xde4941 0xda788b 0xda7dcc 0x6d4c64 0x6d86d5 0x6d9f17 0xda0e08 0x6cc8a7 0x7f64cac1e76d 0x6cc729

This record :  auto_id: 96043 in mysql is 
        auto_id: 96043
             id: 1682560
           name: T”boli
     ascii_name: T"boli
alternate_names: ONYIS
            lat: 6.2000000
            lon: 124.8333300
  feature_class: P
   feature_code: PPLA3
   country_code: PH
  country_code2: PHPPLA3
    admin1_code: 11
    admin2_code: 11_PPLA3
    admin3_code: 11_PPLA3P
    admin4_code: 11_P
     population: 0
      elevation: 0
            dem: 587
       timezone: Asia/Manila
       mod_date: 2011-07-31
    insert_time: 2014-04-11 04:26:18

BUT in mongodb

> use mymongo
switched to db mymongo
> db.MyMongo.find({auto_id:'96043'});
>
 not exists

Thanks 
Amit 

Asya Kamsky

unread,
Apr 23, 2014, 2:32:21 PM4/23/14
to mongodb-user
Amit,

I wouldn't query MySQL, instead I would search for the line with that auto_id in the CSV file.

It's possible that it doesn't properly end the line and runs into the next record, or maybe there is some unescaped characters that are not being parsed correctly - it's hard to guess.

But there is a record in your file that caused that error, it's the contents of the file around that line that I would like to see.

Asya



Reply all
Reply to author
Forward
0 new messages