[COMPASS-4723] Export Collection - Path Collision Error Created: 19/Mar/21  Updated: 29/Oct/23  Resolved: 08/May/23

Status: Closed
Project: Compass
Component/s: Import/Export
Affects Version/s: 1.26.0, 1.33.1, 1.34.1
Fix Version/s: 1.37.0

Type: Bug Priority: Minor - P4
Reporter: Clemens Kunst Assignee: Unassigned
Resolution: Fixed Votes: 4
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

macOS Catalina Version 10.15.7


Attachments: PNG File Screen Shot 2021-03-29 at 2.02.36 PM.png     PNG File Screen Shot 2021-03-29 at 2.39.36 PM.png     PNG File picture 1.png     PNG File picture 2.png    
Issue Links:
Depends
depends on COMPASS-6428 exportCSV() export function and tests Closed
depends on COMPASS-6582 Remove new export feature flag, remov... Closed
Duplicate
Epic Link: COMPASS-5576
Documentation Changes: Not Needed

 Description   

Problem Description 

The collection export function of Compass 1.26.0 is faulty. The reason for this is a self-inflicted path collision error (see picture 1). This error occurs when a certain object contains properties (/fields and values) in some documents and is empty in others. For example, the error currently pops up when trying to export the "listingsAndReviews" collection of the airbnb sample record. 

Should an object contain properties in some documents and none in others, the export function provides an export field for the object in general as well as a field for each object property. In the airbnb case it includes "review_scores" and "review_scores.review_scores_accuracy" etc. (see picture 2). Compass thereby does not comply with the mongoDB Path Collision Restrictions introduced in mongoDB 4.4 (https://docs.mongodb.com/manual/release-notes/4.4-compatibility/#path-collision-restrictions).

We tested the behavior on two devices operating on Compass version 1.26.0 accessing different clusters. In both cases this error occurred.

Issue Fix

On my private mac this issue does not occur. It operates on version 1.24.1.

Furthermore, you can circumvent this issue by either unticking the object field in the export settings window or by unticking all the individual object properties. In the example above by either unticking "review_scores" or all of review_scores's properties listed in dot notation. In both cases Compass exports all the data.

Steps to Reproduce

  • Load the sample data set into your cluster
  • Use Compass 1.26.0
  • Try to export "listingsAndReviews" from sample_airbnb (or any other collection where a document object contains properties in some cases and no properties in others)

Expected Results

Export of collection into a JSON file.

Actual Results

Path Collision Error

Additional Notes



 Comments   
Comment by Claudio Santana [ 01/Dec/22 ]

Customer reached us as they were facing the same issue still on Compass version 1.34.1. Following also the same reported on our Community Forum, as a possible workaround, they have confirmed that they were able to export the referred collection after unchecking the offended fields, following the steps bellow as an example:

1. go back to “select fields”
2. uncheck review_scores.review_scores_accuracy (and uncheck all fields under “review_scores”)

The object-type “review_scores” will include all necessary data.

They have also pointed that once their object is optional, meaning populated in some documents, not populated in others, it seems that this issue arises when they have an empty object.

Following this workaround, the empty object returns [object Object] instead of an empty cell.

Comment by Brad Vincelette [ 03/Jun/22 ]

Anyone going to fix this?  Just looking to play around with the data locally.  Any work around?

Comment by Johannes Vallo [ 14/Feb/22 ]

Still happening with the latest version 1.30.1. 
Version 1.25.0 seems to be the last working version. 

Comment by Benedikt Brandt [ 16/Nov/21 ]

I can confirm this issue is still present with 1.29.4. 

Comment by Tomáš Laubr [ 01/Nov/21 ]

Same issue with the latest version 1.28.4. Very annoying issue. No way to export all the data.

Generated at Wed Feb 07 22:37:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.