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.
- is duplicated by
-
COMPASS-4284 Could not import collection into database
-
- Closed
-
- related to
-
COMPASS-4248 Field conversion preview on import displays [object Object] for Int32
-
- Closed
-