Compass exported a document and trying to import a single document

Viewed 1669

I exported a single document from Compass and now I'm trying to import it, but I'm getting Unexpected end of JSON input

Note: the JSON below shows a simplified version for the document, however the one below doesn't import either.

{
    "firstName": "Rod"
}
2 Answers

The file should be in format 1 document per line:

{"firstName": "Rod"}

In Compass, I managed to get it to work with importing about 20 rows at a time, but it will always fail with my 10,000 rows, so it's not a good workaround for larger data files.

There is a known bug with MongoDB, and there is an ongoing Jira ticket open you can follow the progress of here:

https://jira.mongodb.org/browse/COMPASS-3643

MongoDB recommends that you login and comment on this ticket. Describing your use case and how this issue is critical to your usage of Compass.

"The best way to advocate for this feature request is to open a commercial support request and let us know how this is impacting your use of MongoDB." - MongoDB support

Related