Autoloader in Synapse

Aditya Singh 160 Reputation points
2024-01-24T11:33:32.82+00:00

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")
)
Azure SQL Database
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,980 questions
Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
2,212 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,959 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.