[COMPASS-4867] Importing JSON with Arrays does not work Created: 02/Jun/21  Updated: 03/Oct/23  Resolved: 04/Jan/22

Status: Closed
Project: Compass
Component/s: Compass, Import/Export
Affects Version/s: 1.26.1
Fix Version/s: No version

Type: Bug Priority: Major - P3
Reporter: Jeffrey Cheak Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: JPEG File 7237E5BE-9F80-4CD4-8BA5-5E32165308C7.jpeg     File Conformer3D_CID_2244.json     JPEG File E7EF68BC-82BC-459C-9486-EA25E9EF07C8.jpeg    
Issue Links:
Duplicate
duplicates COMPASS-4739 Importing a single JSON document shou... Closed
Documentation Changes: Not Needed

 Description   

Problem Description

As a user, I can NOT upload JSON files with nested arrays that are of different types.  

 This seems to be a repeat issue from here:

https://github.com/mongo-express/mongo-express/issues/433

 

I CAN import the same file correctly via the command line.

Steps to Reproduce

1) Take sample JSON attached...try to import via Compass

 

Expected Results

1) File imports successfully.

Actual Results

1) Error on import.

 

Found work around on unix command shell:

mongoimport --uri mongodb+srv://{MYUSERNAME:MYSECRETPASSWORD}@cluster0.g8fm0.mongodb.net/foo --collection bar --type json --file Conformer3D_CID_2244.json 

 

 

 

 

Additional Notes



 Comments   
Comment by Sergey Petushkov [ 04/Jan/22 ]

Hey jeffrey.cheak thanks for reporting the issue. We are aware and will try to address it eventually (tracked in COMPASS-4739). As a workaround you can wrap you object in an array and then the import will work

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