I have this:connectionString='mongodb+srv://user:pw@something.jghu.mongodb.net/?retryWrites=true&w=majority&appName=dbricks&tls=true'
database='dealflow'
collection='activities'
frame = spark.read.format("mongodb") \
.option("spark.mongodb.read....
Thank you. The issue in the end was that Amazon VPC blocked the 27017 port. I had to add an outbound rule on a Security Group to allow access. That solved it.