Unable to Read Collection/Files from MongoDB using Azure Databricks

simha08
New Contributor II

Hi there,

Can someone help to read data from MongoDB using Azure Databricks? Surprisingly, I am able to connect from Jupyter Notebook and read data, but not from the Azure Databricks.

1) I have install the required spark-connector packages in the cluster. 2) I have a valid MongoDB Atlas Cluster. 3) I have Spark cluster 13.3 LTS.

I am not even able to read the local database which I have created in Mongo DB Compass which has port 27017.

Can someone please help?