[COMPASS-5904] MongoDB Compass 1.32.2 Insert Data does not import JSON Created: 18/Jun/22  Updated: 27/Oct/23  Resolved: 19/May/23

Status: Closed
Project: Compass
Component/s: Documents
Affects Version/s: None
Fix Version/s: 1.37.0

Type: Bug Priority: Minor - P4
Reporter: Ashwin Thumulati Assignee: Unassigned
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS:
node.js / npm versions:
Additional info:


Attachments: PNG File 2022-06-17_21-33-41.png    
Documentation Changes: Not Needed

 Description   

Steps to reproduce:

 

1) Open the MongoDB Compass

2) Go to the Databases Tab and Choose DB

2) Under the Collections Tab, Choose Collection

3) Choose the Documents Tab

4) Click Add or Import Data

5) Select a JSON File (Choose JSON Button)

6) Click Import

7) The following message appears: 

 
Import completed with following errors: 0 / 14

  • Operation passed in cannot be an Array
    Conclusion: 



 Comments   
Comment by Rhys Howell [ 19/May/23 ]

Closing as gone away, if this was an issue it should be fixed in the upcoming 1.37.0 release.

Comment by Ashwin Thumulati [ 27/Jun/22 ]

I wanted to add a REST request. 

 

{{{ "projectKey": "JQA", "name": "Ensure the axial-flow pump is enabled", "precondition": "The precondition.", "objective": "The objective.", "folder": "/Orbiter/Cargo Bay", "status": "Approved", "priority": "Low", "component": "Valves", "owner": "vitor.pelizza", "estimatedTime": 138000, "labels": ["Smoke", "Functional"], "issueLinks": ["JQA-123", "JQA-456"], "customFields":

{ "single choice": "Propulsion engines", "multichoice": "Brazil, England" }

, "testScript": { "type": "STEP_BY_STEP", "steps": [

{ "description": "Ignite the secondary propulsion engines.", "testData": "Combustion chamber's initial pressure: 10", "expectedResult": "Ensure the high-pressure combustion chamber's pressure is around 3000 psi." }

]
}
}}}

Comment by Anna Henningsen [ 20/Jun/22 ]

sthumulati@gmail.com This is happening if your JSON input file contains a top-level Array with Array entries inside of it, since those cannot easily be mapped to documents. Can you share the file you are inserting, and tell us what the expected behavior for importing that file would be?

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