While importing a csv file into mongo database, I get an error :
exception : CSV file ends while inside quoted field
and the import operation aborts. I checked the actual records it was referring to in the exception description. I was able to import that record independently into the mongodb. When I try to import the whole file, it does not work.
What could be the reason for this issue ? I did check that record manually and was also able to import that record independently into the mongodb. Could it still be an issue with quotes/commas orother special characters that might cause a problem ?
According to the exception : error is with Row 3 Here are some more rows before and after that row. I am using mongoimport with parameters
mongoimport -h 127.0.0.1 -d databasename -c collectionname --type csv --file filelocation --headerline --ignoreBlanks
connected to: 127.0.0.1
exception:CSV file ends while inside quoted field
2014-07-17T22:39:29.629-0700 check 9 6307
2014-07-17T22:39:29.631-0700 imported 6306 objects
encountered 1 error(s)
Row 1:
"1555502","149","2012-07-26 17:13:10","iantist","2014-05-02 17:39:48","http://twitter.com/@iantist",,N,"<p>Neuroscientist,, rabid R user at work and home. </p>
","21","8","0",,N,,N,,N,"1442157"
Row 2:
"1555662","794","2012-07-26 18:18:37","olivecoder","2014-05-02 16:09:38","http://www.linkedin.com/in/olivecoder","Brazil","<p>I am a software engineer focused on developing solutions for the telecommunications industry since 1990. I have a huge background in R&D projects,, developing firmware for telecom equipment,, CTI applications,, softswitches,, IVR and others telecom solutions that resulted in patent registration. I founded Mares Telecom to provide value-added services to carriers and to create new technologic solutions for the telecom market.</p>

<p><a href=,"http://linkedin.com/in/olivecoder," rel=,"nofollow,">http://linkedin.com/in/olivecoder</a></p>
","135","75","8",,N,,N,"42","1693823"
Row 3:
"1556310","15","2012-07-27 00:07:09","Volodymyr Zhabiuk","2013-05-14 01:13:28","http://www.linkedin.com/in/volodymyrzhabiuk",,N,,N,"9","0","0",,N,,N,,N,"1694670"
Row 4:
"1557339","35","2012-07-27 10:09:27","Brice","2014-05-03 06:00:33","http://fr.linkedin.com/in/bleporini",,N,,N,"7","1","0",,N,,N,,N,"1695972"
Row 5:
"1558307","253","2012-07-27 17:06:29","PurpleDiane","2014-04-03 22:39:43","http://www.linkedin.com/in/dianedemerschen","San Diego,, CA","<p>20+ years programming experience,, primarily in Computer-Aided Design and Manufacturing. Early Fortran,, migrated to C. Took time off to care for my mom when she had Alzheimer's. Now updating my skills in C++,, Java,, Python and Android programming. At least that's what I've studied so far!</p>

<p>I got a lot of information from StackOverflow while I was taking my C++ classes,, now I hope to learn more and perhaps even be of some help.</p>
","25","6","1",,N,,N,,N,"1697171"