Invalid BSON object type for CSV output: 6

966 views
Skip to first unread message

davidp4web

unread,
Oct 5, 2012, 4:54:43 PM10/5/12
to mongod...@googlegroups.com
I'm getting a bunch of these when running mongoexport:

Invalid BSON object type for CSV output: 6

What does this mean?  

As a side question, where can I find a list of BSON types and numbers?  I'm assuming that the "6" refers to an object type...
Google and Bing turned up nothing useful.

FWIW, here's the command:
mongoexport -d profiles_staging -c top_prs -q '{$query: {"value.count": {$gt: 1}}, $orderby: {"value.count": -1}}' -f value.count,value.name,value.website,value.location,value.scoring --csv -o top_prs.csv

Thanks in advance!

David

Randolph Tan

unread,
Oct 5, 2012, 7:23:14 PM10/5/12
to mongod...@googlegroups.com
Which version were you using? I tried using your exact syntax on a small sample set and it ran fine. As for the BSON types, type 6 is undefined and you also check the documentation here:

David Pellegrini

unread,
Oct 10, 2012, 1:19:33 PM10/10/12
to mongod...@googlegroups.com
Thanks for the response, Randolph.  Sorry for not responding sooner ... got pulled off to fight other fires and finally circling back to this.

Running mongoexport version 2.0.2.

I had already looked at the site you referenced, but did not see any mapping of number to type.  Did I just miss it?

David
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com
See also the IRC channel -- freenode.net#mongodb

Randolph Tan

unread,
Oct 10, 2012, 1:33:00 PM10/10/12
to mongod...@googlegroups.com
Oh, I apologize. I just realized the doc was a little bit cryptic. Using type 6 as an example, this is the entry in the doc that describes what type it is:

"\x06" e_name Undefined — Deprecated

so the hex value is the value of the type and the most right hand side is the description of the type.

I rechecked the code again and I realized that this gets printed out when you have documents that have an undefined value. But the export should still proceed with the undefined value being translated into a blank string "". Was your export failing?
Reply all
Reply to author
Forward
0 new messages