问题描述
我正在尝试使用以下方法将数据导入Azure机器学习实验
推荐答案
我认为这应该是MongoDB的问题. 如上所述 使用 PyMongo与MongoDB Atlas :
I think this should be a MongoDB problem. As described in Using PyMongo with MongoDB Atlas:
自 PyMongo v3.4.0, 您可以连接到 MongoDB Atlas ,通过传递连接 MongoDB Atlas提供给 "style =" margin:0px; padding:0px; border:0px; font-style:inherit; font-variant:inherit; font-weight:inherit; line-height:inherit; font-family:inherit; vertical-align:基线;颜色:#005999> MongoClient , 例如:
Since PyMongo v3.4.0, you can connect to MongoDB Atlas by passing the Connection String URIprovided by MongoDB Atlas to MongoClient, example:
from pymongo import MongoClient
client = MongoClient("mongodb://USER:[email protected]:27017,ABC-cluster-shard-00-01-XYZ.mongodb.net:27017,ABC-cluster-shard-00-02-XYZ.mongodb.net:27017/DATABASE?ssl=true&replicaSet=ABC-cluster-shard-0&authSource=admin")
与MongoDB Atlas的连接需要 TLS/SSL . 使用PyMongo 3.3+,您可以使用以下 Python pip 命令:
Connections to MongoDB Atlas require TLS/SSL. With PyMongo 3.3+, you can install PyMongo 3.3+ and any TLS/SSL-related dependencies using the following Python pip command:
python -m pip install pymongo[tls]
这篇关于在连接Mongo Atlas集群时出现ServerSelectionTimeoutError,同时在Azure Machine Learning Studio上导入Mongo DB数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!