CSV import issue

12 views
Skip to first unread message

rl

unread,
Mar 19, 2012, 4:55:05 PM3/19/12
to mongod...@googlegroups.com
I have a very large CSV file which contains addresses including a ZIP code.  The ZIP code is not quoted so when I run the monogo db import command, it treats it as a number.  I don't see an option on the import tool to handle this.  What is recommended?

Thanks in advance

Kristina Chodorow

unread,
Mar 19, 2012, 5:40:58 PM3/19/12
to mongod...@googlegroups.com
Unfortunately, there isn't a built-in option to deal with this.  I think you'll either have to preprocess the CSV or post-process the collection. Preprocessing could be done with awk and postprocessing could be done with a JS script.
Reply all
Reply to author
Forward
0 new messages