# org.apache.spark.SparkClassNotFoundException: \[DATA\_SOURCE\_NOT\_FOUND\] Failed to find the data source: org.elasticsearch.spark.sql. Make sure the provider name is correct and the package is properly registered and compatible with your Spark version

**URL:** <https://discuss.elastic.co/t/org-apache-spark-sparkclassnotfoundexception-data-source-not-found-failed-to-find-the-data-source-org-elasticsearch-spark-sql-make-sure-the-provider-name-is-correct-and-the-package-is-properly-registered-and-compatible-with-your-spark-version/380271>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting, docker\
**Created:** [July 19, 2025, 1:06am UTC](https://discuss.elastic.co/t/org-apache-spark-sparkclassnotfoundexception-data-source-not-found-failed-to-find-the-data-source-org-elasticsearch-spark-sql-make-sure-the-provider-name-is-correct-and-the-package-is-properly-registered-and-compatible-with-your-spark-version/380271 "2025-07-19T01:06:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vsam](https://avatars.discourse-cdn.com/v4/letter/v/b487fb/32.png) [@vsam](https://discuss.elastic.co/u/vsam)\
**Post date:** [July 19, 2025, 1:06am UTC](https://discuss.elastic.co/t/org-apache-spark-sparkclassnotfoundexception-data-source-not-found-failed-to-find-the-data-source-org-elasticsearch-spark-sql-make-sure-the-provider-name-is-correct-and-the-package-is-properly-registered-and-compatible-with-your-spark-version/380271/1 "2025-07-19T01:06:01Z")

</div>

Hi Everyone,

Currently I want to write pyspark dataframe to Elasticcloud index

Below is the code, however pyspark is unable to find the org.elasticsearch.spark.sql.

Environment - Databricks  
Databricks Run time - 16.3

```auto
(   
    df
    .write
    .mode('overwrite')
    .format("org.elasticsearch.spark.sql")
    .option("es.resource", "INDEX_NAME")
    .option("es.write.operation", "index")
    .option("es.net.http.header.Authorization", "TOKEN")
    .option("es.nodes", conf['host'])
    .option("es.port", conf['port'])
    .save()
    )

```

Error

```auto
 org.apache.spark.SparkClassNotFoundException: [DATA_SOURCE_NOT_FOUND] Failed to find the data source: org.elasticsearch.spark.sql. Make sure the provider name is correct and the package is properly registered and compatible with your Spark version

```

Please provide you suggestion.
