Autoloader in Synapse
Aditya Singh
160
Reputation points
I want to load data incrementally using Azure Synapse Analytics Notebook(dedicated spark pool) there is an option on databricks to load data incrementally which is autoloader so my question was can we use this option in Azure Synapse Analytics Notebook?
This is my code :
This code works on Databricks but it not working on Azure Synapse Analytics Notebook:
Py4JJavaError: An error occurred while calling o4041.load. : java.lang.ClassNotFoundException: Failed to find data source: cloudFiles. Please find packages at https://spark.apache.org/third-party-projects.html
(spark.readStream
.format("cloudfiles")
.option("cloudfiles.format","csv")
.option("cloudfiles.schemaLocation",f"{output_path}/autoloader/schemalocation")
.load(f"{internal_path}")
.writeStream
.option("checkpointlocation",f"{output_path}/autoloader/checkpoint")
.option("path",f"{output_path}/autoloader/output")
.table("autoloader")
)
Sign in to answer