cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Why is my streaming job not resuming even though I specified checkpoint directory

User16869510359
Esteemed Contributor

I have provided the checkpointLocation as below, however I see the config is ignored for my streaming query

option("checkpointLocation", "path/to/checkpoint/dir")

1 ACCEPTED SOLUTION

Accepted Solutions

User16869510359
Esteemed Contributor

This is a common question from many users. If the streaming checkpoint directory is specified correctly then this behavior is expected. 

Below is an example of specifying the checkpoint correctly

df.writeStream
 
 .format("parquet")
 
 .option("checkpointLocation", "path/to/checkpoint/dir")
 
 .option("path", "path/to/destination/dir")
 
 .start()

Instead, if you are specifying the checkpointLocation as readStream option it's ignored. One other common scenario where the option is ignored is when you specify the checkpointLocation as an option for the write operation within the forEachBatch. The option should be provided for the writeStream API

View solution in original post

1 REPLY 1

User16869510359
Esteemed Contributor

This is a common question from many users. If the streaming checkpoint directory is specified correctly then this behavior is expected. 

Below is an example of specifying the checkpoint correctly

df.writeStream
 
 .format("parquet")
 
 .option("checkpointLocation", "path/to/checkpoint/dir")
 
 .option("path", "path/to/destination/dir")
 
 .start()

Instead, if you are specifying the checkpointLocation as readStream option it's ignored. One other common scenario where the option is ignored is when you specify the checkpointLocation as an option for the write operation within the forEachBatch. The option should be provided for the writeStream API

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.