[COMPASS-5937] Compass import inserts unexplained null values and nested arrays Created: 07/Jul/22  Updated: 27/Oct/23  Resolved: 18/Oct/22

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

Type: Bug Priority: Major - P3
Reporter: Sam Al Shami Assignee: Unassigned
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Compass json file import tool


Attachments: PNG File Screenshot 2022-10-18 at 10.34.59.png     PNG File Screenshot from 2022-07-06 23-35-47.png     PNG File Screenshot from 2022-07-06 23-36-30.png    
Documentation Changes: Not Needed

 Description   

Problem Statement/Rationale

When I used the import tool to import a json file. in some fields the import automatically adds multiple nulls as values to the fields that did not exist in the original file, and adds the actual data in another nested array. 

Please be sure to attach relevant logs with any sensitive data redacted.

Steps to Reproduce

It seems that this happens when the name if the field contains a number, example:

 
"PCIDSS v3.2": ["12.1","12.1.1"],

Expected Results

expected document in database:
PCIDSS v3: Array
0: "12.1"
1: "12.1.1"

Actual Results

 
PCIDSS v3: Array
0: null
1: null
2: Array
    0: "12.1"
    1: "12.1.1"

Additional Notes

I removed the number from the field name and the nulls / nested array went away. Another example in screenshots.



 Comments   
Comment by Rhys Howell [ 12/Jul/22 ]

Still reproducible on 1.33.1.
Import json to reproduce:
[

{ "_id": 2, "PCIDSS v3.2": ["12.1","12.1.1"] }

]

Comment by Sam Al Shami [ 08/Jul/22 ]

Just fount out thwn this happens, the import tool cuts the number from the field name and uses it. see screenshots

Comment by Sam Al Shami [ 07/Jul/22 ]

In some of the instances, there would be no nulls, but the nested array would be there, The import tool does not show any errors or warnings. 

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