Submit your inspiring success story or innovative use case to the 2022 Dataiku Frontrunner Awards! ENTER YOUR SUBMISSION

connect mongoDB atlas cluster using mongo+srv uri

Solved!
jtobelem
Neuron
Neuron
connect mongoDB atlas cluster using mongo+srv uri

Hi,

I have set up a mongoDB atlas cluster. I can connect to this cluster from a notebook in a DSS project with the code :

 

import pymongo

client = pymongo.MongoClient("mongodb+srv://myuser:password@cluster0.zzhk4.mongodb.net/sample_geospatial?retryWrites=true&w=majority")

client.list_database_names()
['sample_airbnb',
 'sample_analytics',
 'sample_geospatial',
 'sample_mflix',
 'sample_restaurants',
 'sample_supplies',
 'sample_training',
 'sample_weatherdata',
 'admin',
 'local']

 

But I am not able to create a connection on this cluster (see image). I don't know if the word '+srv' in the uri is required.

0 Kudos
1 Solution
jtobelem
Neuron
Neuron
Author
1 Reply
jtobelem
Neuron
Neuron
Author

just found a solution here : https://stackoverflow.com/a/56427030/5051894