I am trying to read the data from mongodb using pyspark ( 2.4.3) but my job is failing due to incorrect url . my mongodb url is with srv , Please refer the url below:
Above url is used and this works with simple pymongo python library but with spark same url is throwing an error .
I have below queries that I am looking an answer for an answer -
- as my spark version is 2.4.3 what is correct spark-mongo db connector for this ?
- if there is srv in mongodb url , what is correct way to read the data , can you please provide sample code ?