我是mongoDB的新手,拥有免费的Atlas账户。但是,我在使用mongo导入时遇到了问题。
系统:Windows
>mongo --version
MongoDB shell version v4.2.0
git version: a4b751dcf51dd249c5865812b390cfd1c0129c30
allocator: tcmalloc
modules: none
build environment:
distmod: 2012plus
distarch: x86_64
target_arch: x86_64
mongoimport 字符串:
mongoimport --host Cluster0-shard-0/cluster0-shard-00-00-MY.mongodb.net:27017,cluster0-shard-00-01-MY.mongodb.net:27017,cluster0-shard-00-02-MY.mongodb.net:27017 --ssl --username MYUSER --password MYPASS --authenticationDatabase admin --db db --collection coll --type json --file D:\downloads\records.json
但我一直收到这个错误:
2019-09-28T15:40:33.108-0600 WARNING: ignoring unsupported URI parameter 'replicaset'
2019-09-28T15:40:33.933-0600 connected to: mongodb://cluster...
2019-09-28T15:40:34.076-0600 Failed: cannot decode array into a D
2019-09-28T15:40:34.076-0600 0 document(s) imported successfully. 0 document(s) failed to import.