[COMPASS-4298] JSON-data import causes some data altered Created: 17/May/20  Updated: 29/Oct/23  Resolved: 15/Jun/20

Status: Closed
Project: Compass
Component/s: Compass
Affects Version/s: 1.21.2
Fix Version/s: 1.22.0

Type: Bug Priority: Critical - P2
Reporter: Mario Vernari Assignee: Alena Khineika
Resolution: Fixed Votes: 0
Labels: JSON, import
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 10


Attachments: File customers.json    
Issue Links:
Duplicate
is duplicated by COMPASS-4284 Could not import collection into data... Closed
Related
related to COMPASS-4248 Field conversion preview on import di... Closed
Sprint: Iteration Elderberry

 Description   

JSON-data import mistakes data type and value for many records. The import process ended successfully: no alert was displayed.

As for instance, here is the JSON fragment taken from the file to be imported:

 

{
 "_id": {
 "$oid": "5d973ae744376d2aae72a160"
 },
 "idx": 328,
 "dev_DT": {
 "$date": "2019-05-17T14:03:40.320Z"
 },
 "histo_DT": {
 "$date": "2019-05-17T14:08:00.553Z"
 },
 "official_auto": 18.9,
 "official_man": 0,
 "read_auto": 18.9,
 "read_man": 18.9,
 "is_forecast": false,
 "version": -2,
 "F": 12
}
 

Here is the related entry once the import process has been done:

{"_id":{"$oid":"5d973ae744376d2aae72a160"},"idx":328,"dev_DT":{"$date":"2019-05-17T14:03:40.320Z"},"histo_DT":{"$date":"2019-05-17T14:08:00.553Z"},"official_auto":true,"official_man":true,"read_auto":true,"read_man":true,"is_forecast":false,"version":-2,"F":12}

Note that some of the fields were changed from a valid number to a "true".

Not all the records are broken, and not clear what is the reason for a so strange behavior.

The JSON file was exported with a MongoDB Compass 1.21.2 on another Windows 10 machine.


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