RameshChejarla
New Contributor III

Hi Prashanth, Auto loader for me its reading only new files, can you pls go through the below script.

df = (
spark.readStream
.format("cloudFiles")
.option("cloudFiles.format", "csv")
.option("cloudFiles.schemaLocation", "path")
.option("recursiveFileLookup", "true")
.option("header", "true")
.schema(schema)
.load("path")
)

df.writeStream \
.format("delta") \
.option("checkpointLocation", "path") \
.option("mergeSchema", "true") \
.trigger(availableNow=True) \
.toTable("path")