Hello @Cheng, Jack
Thanks for the question and using MS Q&A platform.
The error you are encountering,
org.apache.spark.SparkClassNotFoundException: [DATA_SOURCE_NOT_FOUND] Failed to find the data source: com.databricks.spark.sqldw
, indicates that the Spark SQL Data Warehouse (SQL DW) connector is not available in your current Spark environment. This can happen if the required library is not included in your Databricks cluster.
To resolve this error, you should ensure that the appropriate library for the SQL DW connector is installed on your Databricks cluster. You can do this by following these steps:
- Go to your Databricks workspace.
- Navigate to the "Clusters" section.
- Select your cluster and click on the "Libraries" tab.
- Install the
com.databricks:spark-sqldw_2.11:<version>
library, replacing<version>
with the specific version compatible with your Spark version.
Once the library is installed, try running your script again.
Similar thread for reference: Error Connecting to Delta Share
Hope this helps. Do let us know if you have any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.