mongoexport truncates string data

444 views
Skip to first unread message

saurabh srivastava

unread,
Mar 2, 2012, 11:58:25 PM3/2/12
to mongod...@googlegroups.com
Exporting a collection using mongoexport truncates the string field and append "..." to it. Is there a way to disable this feature in the export?

Bill Hayward

unread,
Mar 5, 2012, 6:41:56 AM3/5/12
to mongodb-user
Does this seem to be for fields that contain a certain length, or
above, or is it evident in all cases?

On Mar 2, 11:58 pm, saurabh srivastava <ssrivastava.m...@gmail.com>
wrote:

saurabh srivastava

unread,
Mar 5, 2012, 11:47:48 PM3/5/12
to mongod...@googlegroups.com
I realized that this is a known issue. http://www.mongodb.org/display/DOCS/mongoexport first comment on the page talks of this. I wrote my custom exporter which does not truncate. But it would appear that the truncation happens for longer string fields.

saurabh

Josh Price

unread,
Jul 8, 2012, 8:50:56 AM7/8/12
to mongod...@googlegroups.com
I've made a patch which fixes this issue and created a github pull request (https://github.com/mongodb/mongo/pull/260).

Personally I'd love to see this in the 2.0.7 release. Is there anything else I can do to make this happen?

Thanks in advance,
Josh

On Thursday, June 28, 2012 12:26:39 AM UTC+10, Josh Price wrote:
I'm experiencing the same problem. Strings are being truncated at around 153 characters.


From my understanding of the code, the toString() function defaults to not "full", so the full parameter should be set to true as follows:

    return csvEscape(object.toString(false, true), true);

Could someone please confirm this is the case?

Thanks,
Josh
Reply all
Reply to author
Forward
0 new messages