<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: DATA_SOURCE_NOT_FOUND Error with MongoDB (Suggestions in other similar posts have not worked) in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/data-source-not-found-error-with-mongodb-suggestions-in-other/m-p/138948#M51058</link>
    <description>&lt;P&gt;Thanks for the update! Yes, you cannot do this on a serverless platform.&amp;nbsp; But for a non-serverless cluster, the approach shared below is the right way ! If youar question is answered caould you please accept this as solution&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Nov 2025 16:29:12 GMT</pubDate>
    <dc:creator>K_Anudeep</dc:creator>
    <dc:date>2025-11-13T16:29:12Z</dc:date>
    <item>
      <title>DATA_SOURCE_NOT_FOUND Error with MongoDB (Suggestions in other similar posts have not worked)</title>
      <link>https://community.databricks.com/t5/data-engineering/data-source-not-found-error-with-mongodb-suggestions-in-other/m-p/138645#M50988</link>
      <description>&lt;P&gt;I am trying to load data from MongoDB into Spark. I am using the Community/Free version of DataBricks so my Jupiter Notebook is in a Chrome browser.&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from pyspark.sql import SparkSession

spark = SparkSession.builder \
    .config("spark.mongodb.read.connection.uri", uri) \
    .config("spark.mongodb.output.uri", uri) \
    .config("spark.jars.packages", "org.mongodb.spark:mongo-spark-connector_2.12:10.1.1") \
    .getOrCreate()





database = db
collection = tweets

df = spark.read.format("mongodb") \
    .option("uri", uri) \
    .option("database", database) \
    .option("collection", collection) \
    .load()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the error:&lt;/P&gt;&lt;PRE&gt;&lt;BR /&gt;df.display()&lt;BR /&gt;[DATA_SOURCE_NOT_FOUND] Failed to find the data source: mongodb. Make sure the provider name is correct and the package is properly registered and compatible with your Spark version. SQLSTATE: 42K02&lt;BR /&gt;[DATA_SOURCE_NOT_FOUND] Failed to find the data source: mongodb. Make sure the provider name is correct and the package is properly registered and compatible with your Spark version. SQLSTATE: 42K02&lt;/PRE&gt;&lt;P&gt;This project is for a class so please, kindly treat me as a novice. The data is in the correct MongoDB collection, my uri and all other variables are correct and the MongoDB connection/deployment pinged successfully. I am willing to provide any necessary information. I have spent over three hours trying to fix this.&lt;/P&gt;&lt;P&gt;Please help me, thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Nov 2025 19:32:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/data-source-not-found-error-with-mongodb-suggestions-in-other/m-p/138645#M50988</guid>
      <dc:creator>kahrees</dc:creator>
      <dc:date>2025-11-11T19:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: DATA_SOURCE_NOT_FOUND Error with MongoDB (Suggestions in other similar posts have not worked)</title>
      <link>https://community.databricks.com/t5/data-engineering/data-source-not-found-error-with-mongodb-suggestions-in-other/m-p/138679#M50993</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/197421"&gt;@kahrees&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Good Day!&lt;/P&gt;
&lt;P&gt;I tested this internally, and I was able to reproduce the issue. Screenshot below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="K_Anudeep_0-1762914681450.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/21583iD9E8BC590028264E/image-size/large?v=v2&amp;amp;px=999" role="button" title="K_Anudeep_0-1762914681450.png" alt="K_Anudeep_0-1762914681450.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You’re getting &lt;STRONG&gt;[DATA_SOURCE_NOT_FOUND]&lt;/STRONG&gt; ... mongodb because the MongoDB Spark connector jar isn’t actually on your cluster’s classpath. On Databricks (including Community Edition), setting&lt;BR /&gt;&lt;STRONG&gt;spark.jars.packages&lt;/STRONG&gt; inside SparkSession.builder usually do not install cluster libraries—the cluster must have the jar pre-installed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI data-start="4250" data-end="4343"&gt;
&lt;P data-start="4252" data-end="4343"&gt;Install the connector as a cluster library (Libraries → Maven → Install → Restart).&lt;/P&gt;
&lt;/LI&gt;
&lt;LI data-start="4250" data-end="4343"&gt;
&lt;P data-start="4252" data-end="4343"&gt;Use a connector matching your &lt;STRONG data-start="4378" data-end="4387"&gt;Scala&lt;/STRONG&gt; line (Databricks DBR typically = Scala &lt;STRONG data-start="4427" data-end="4435"&gt;2.12&lt;/STRONG&gt; → use &lt;CODE data-start="4442" data-end="4449"&gt;_2.12&lt;/CODE&gt;) .Not also check your connectivity from Databricks to mongo before rer-unning&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;I tested this, and it works locally in my env.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Nov 2025 03:02:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/data-source-not-found-error-with-mongodb-suggestions-in-other/m-p/138679#M50993</guid>
      <dc:creator>K_Anudeep</dc:creator>
      <dc:date>2025-11-12T03:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: DATA_SOURCE_NOT_FOUND Error with MongoDB (Suggestions in other similar posts have not worked)</title>
      <link>https://community.databricks.com/t5/data-engineering/data-source-not-found-error-with-mongodb-suggestions-in-other/m-p/138941#M51057</link>
      <description>&lt;P&gt;Thank you. Using the information you gave me I was able to move a step further. It turns out that because I am using a serverless cluster, I am unable to install the Maven library. I am not sure how to move to a cluster with a server but I will continue the project in another way.&lt;BR /&gt;&lt;BR /&gt;Here are the two links that helped me.&lt;BR /&gt;&lt;A href="https://docs.databricks.com/aws/en/libraries/package-repositories" target="_blank"&gt;https://docs.databricks.com/aws/en/libraries/package-repositories&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.databricks.com/aws/en/libraries/cluster-libraries#install-a-library-on-a-cluster" target="_blank"&gt;https://docs.databricks.com/aws/en/libraries/cluster-libraries#install-a-library-on-a-cluster&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;And the response from&amp;nbsp;@&lt;SPAN&gt;Louis_Frolio here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://community.databricks.com/t5/data-engineering/install-maven-package-to-serverless-cluster/td-p/83468" target="_blank"&gt;https://community.databricks.com/t5/data-engineering/install-maven-package-to-serverless-cluster/td-p/83468&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Nov 2025 14:49:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/data-source-not-found-error-with-mongodb-suggestions-in-other/m-p/138941#M51057</guid>
      <dc:creator>kahrees</dc:creator>
      <dc:date>2025-11-13T14:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: DATA_SOURCE_NOT_FOUND Error with MongoDB (Suggestions in other similar posts have not worked)</title>
      <link>https://community.databricks.com/t5/data-engineering/data-source-not-found-error-with-mongodb-suggestions-in-other/m-p/138948#M51058</link>
      <description>&lt;P&gt;Thanks for the update! Yes, you cannot do this on a serverless platform.&amp;nbsp; But for a non-serverless cluster, the approach shared below is the right way ! If youar question is answered caould you please accept this as solution&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Nov 2025 16:29:12 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/data-source-not-found-error-with-mongodb-suggestions-in-other/m-p/138948#M51058</guid>
      <dc:creator>K_Anudeep</dc:creator>
      <dc:date>2025-11-13T16:29:12Z</dc:date>
    </item>
  </channel>
</rss>

