Path Collision trying to Export Collection

I’m completely new to Mongo so please bear with me. I’m using Compass and I’m able to view collections, query the data, etc. Everything is working fine.

When I try to export a whole collection, on most collections, it works fine.

When I tried to export 1 collection (all fields) to a CSV file, I get an error:

Path collision at Contact.Email remaining portion Email

I’m not selecting individual fields, or doing anything crazy. I’m just trying to export the whole collection.

I noticed that when I view the documents in the collection, I don’t even see the offending fields.

1 Like

What is your Compass version?
Could be bug with latest version
Check this link

https://jira.mongodb.org/browse/COMPASS-4723?jql=project%20%3D%20COMPASS%20AND%20fixVersion%20%3D%201.24.1

I’m having the same issues and I’m running the most recent Compass version.

Did you try with lower version of Compass?

or try the fix given in that link-unselect the fields causing the error

Hi,

I am facing the same issue while exporting a particular collection from compass version 1.30.1, I tired to omit the offending column, it stuck at next column.
However, I am able to export other collections.

Hope you can suggest a solution.

Thank you.
Siva

Did you try with mongoexport from command line?
or use a lower version of Compass
Show the sample doc
How many records in this collection?

Hi Ram,

Thanks for the response.

No, I did not try the command line option for export, I will try.

If compass version is the issue, I was able to export another document “Grades”.

The document that I am trying to export is “companies” under sample_training, it is having 9.500 records and of size 15.9MB.

The document and fields are too long to give here.

Cheers
Siva

I’ve got the same issue.
My solution is:

  1. go back to “select fields”
  2. uncheck “contact.email” (and uncheck all fields under “contact”)
    The object-type “contact” will include all necessary data

It’s strange that some object-type is ok but some has issue… I’m not sure why

8 Likes

Also, encounter the same issue, the issue is the field showing the error is not consistent in the collection, uncheck the field showing that error and export, Don’t know how it works but it will still export the field if it is available.

1 Like

Thanks, Your solution helped for my testing purposes.
I received the same error and I unselected the reviews_scores (along with all its fields.)

I think issue in compass filter export ,

For Example
{
“user”: {
“name”: “bbb”,
“firstname”: “a”
}
“email”: “test@test.com
}

if we are filter with “user.name” : “test” after that export its through the error, once you got error

  1. Go back to select fields un check “user.name”, “user.firstName” fields, after that add the “user” filed manually after that try to export its working
    }

Thanks Arthur_Chan from your comments

That worked on me, thank you