cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Can I reset the checkpoint of a streaming job if I want to do a full reload of a table?

User16826992666
Databricks Employee
Databricks Employee
 
1 ACCEPTED SOLUTION

Accepted Solutions

sajith_appukutt
Databricks Employee
Databricks Employee

If the read stream definition has something similar to

val df = spark
  .read
  .format("kafka")
  .option("kafka.bootstrap.servers", "host1:port1,host2:port2")
  .option("subscribePattern", "topic.*")
  .option("startingOffsets", "earliest")

resetting the checkpoint would attempt to read from the earliest record inside the topic. Now, whether this would result in the full reload of the table would be a function of retention.ms of the topic. If there are are records that have already been expired from kafka, they won't be reprocessed.

View solution in original post

2 REPLIES 2

Digan_Parikh
Databricks Employee
Databricks Employee

sajith_appukutt
Databricks Employee
Databricks Employee

If the read stream definition has something similar to

val df = spark
  .read
  .format("kafka")
  .option("kafka.bootstrap.servers", "host1:port1,host2:port2")
  .option("subscribePattern", "topic.*")
  .option("startingOffsets", "earliest")

resetting the checkpoint would attempt to read from the earliest record inside the topic. Now, whether this would result in the full reload of the table would be a function of retention.ms of the topic. If there are are records that have already been expired from kafka, they won't be reprocessed.