When trying to execute the code in Streaming Data with Apache Spark and MongoDB | MongoDB receiving an error message which states that "
org.apache.spark.SparkClassNotFoundException: [DATA_SOURCE_NOT_FOUND] Failed to find data source: mongodb. Please find packages at https://spark.apache.org/third-party-projects.html."
Any thoughts on what is going wrong here. The Mongodb is Mongo Atlas. Spark engine is thru Databricks
Have you installed Mongodb Spark connector to your databricks environment?
Here are the steps:
Once the cluster is up and running, click on “Install New” from the Libraries menu.
Here we have a variety of ways to create a library, including uploading a JAR file or downloading the Spark connector from Maven. In this example, we will use Maven and specify org.mongodb.spark:mongo-spark-connector_XXX: as the coordinates.