-upsert --upsertFields  可以实现mongodb按照指定字段去重,但是导入数据很慢

mongoimport --host 127.0.0.0.1 --port 27017 --username root --password root --collection info --db cust  --upsert --upsertFields custId --file  C:/Users/18482/Desktop/test/output/2.json

 posted on 2020-03-20 10:21  xibuhaohao  阅读(433)  评论(0编辑  收藏  举报