<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: What is a Checkpoint in Structured Streaming? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/what-is-a-checkpoint-in-structured-streaming/m-p/167834#M55780</link>
    <description>&lt;P&gt;Hey &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/250070"&gt;@gowri_databrick&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Think of the checkpoint as a bookmark for your stream.&lt;/P&gt;&lt;P&gt;As your query runs, it writes down two things: which data it has already read from the source, and the state it has built up so far, like running counts or aggregations.&lt;/P&gt;&lt;P&gt;So with your transactions example, say the stream has processed everything up to file 500 and then the cluster dies. When you restart, Spark reads the checkpoint, sees that it got through file 500, and picks up at 501. No gap, and nothing gets processed twice. Without a checkpoint it would either start over from scratch or start from now and silently lose everything in between.&lt;/P&gt;&lt;P&gt;That is really the whole point: exactly once processing across restarts. Streams do not run forever without interruption. Clusters restart, jobs get redeployed, code gets updated. The checkpoint is what makes those interruptions boring instead of a data quality incident.&lt;/P&gt;&lt;P&gt;Two practical things worth knowing. Each streaming query needs its own checkpoint location, because sharing one between two queries will break them. And do not delete the checkpoint directory when a stream misbehaves. It is tempting, but it wipes the bookmark, so you will either reprocess everything or lose data.&lt;/P&gt;</description>
    <pubDate>Mon, 07 Sep 2026 19:45:07 GMT</pubDate>
    <dc:creator>Islam_hoti</dc:creator>
    <dc:date>2026-09-07T19:45:07Z</dc:date>
    <item>
      <title>What is a Checkpoint in Structured Streaming?</title>
      <link>https://community.databricks.com/t5/data-engineering/what-is-a-checkpoint-in-structured-streaming/m-p/167694#M55761</link>
      <description>&lt;P class=""&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I’m learning about Structured Streaming in Databricks and came across checkpoints.&lt;/P&gt;&lt;P&gt;I understand that checkpoints are used to keep track of the progress of a streaming query, but I’d like to understand their purpose more clearly.&lt;/P&gt;&lt;P&gt;For example, if a streaming pipeline is processing customer transactions and the pipeline stops unexpectedly, how does the checkpoint help the pipeline continue processing from where it stopped?&lt;/P&gt;&lt;P&gt;What is the main purpose of checkpoints, and why are they important in a real-time data pipeline?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 06 Sep 2026 12:55:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/what-is-a-checkpoint-in-structured-streaming/m-p/167694#M55761</guid>
      <dc:creator>gowri_databrick</dc:creator>
      <dc:date>2026-09-06T12:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: What is a Checkpoint in Structured Streaming?</title>
      <link>https://community.databricks.com/t5/data-engineering/what-is-a-checkpoint-in-structured-streaming/m-p/167695#M55762</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/250070"&gt;@gowri_databrick&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Welcome to the world of Structured Streaming!&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV class="du-bois-light-typography css-zj8sjw" data-genai-markdown-block="true"&gt;Think of a checkpoint as a bookmark for your streaming pipeline. It's a directory on durable storage (such as S3, ADLS, or GCS) where Spark Structured Streaming saves your query's progress after each micro-batch. Specifically, it records:&lt;/DIV&gt;
&lt;UL class="css-0"&gt;
&lt;LI&gt;Offsets...&amp;nbsp;which records from the source have already been processed.&lt;/LI&gt;
&lt;LI&gt;Commits...&amp;nbsp;which micro-batches have been successfully written to the sink.&lt;/LI&gt;
&lt;LI&gt;State...&amp;nbsp;for stateful operations like aggregations or deduplication, the intermediate computation state is saved here too.&lt;/LI&gt;
&lt;LI&gt;Metadata....&amp;nbsp;the unique query ID and configuration details.&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV data-genai-markdown-block="true"&gt;You enable it by setting the&amp;nbsp;checkpointLocation&amp;nbsp;option on your&amp;nbsp;writeStream:&lt;/DIV&gt;
&lt;DIV data-genai-markdown-block="true"&gt;&lt;LI-CODE lang="python"&gt;(df.writeStream
  .option("checkpointLocation", "/Volumes/catalog/schema/volume/checkpoint")
  .toTable("catalog.schema.target_table")
)&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV data-genai-markdown-block="true"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV data-genai-markdown-block="true"&gt;
&lt;DIV class="du-bois-light-typography css-zj8sjw" data-genai-markdown-block="true"&gt;Say you have a pipeline reading customer transactions from Kafka and writing them to a Delta Lake table. The pipeline has processed transactions 1 through 10,000 and the checkpoint has recorded that progress. Now the cluster crashes.&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-zj8sjw" data-genai-markdown-block="true"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-zj8sjw" data-genai-markdown-block="true"&gt;When the pipeline restarts, Spark reads the checkpoint and sees: "I already committed everything up to offset 10,000." It picks up right at 10,001... no data is lost, and no transaction gets processed twice. Without a checkpoint, the pipeline would have no memory of what it already did. It would either start from the beginning (duplicating everything) or skip ahead and lose data.&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-zj8sjw" data-genai-markdown-block="true"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-zj8sjw" data-genai-markdown-block="true"&gt;
&lt;DIV class="du-bois-light-typography css-zj8sjw" data-genai-markdown-block="true"&gt;The checkpoint is what gives Structured Streaming its&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="du-bois-light-typography css-1zhnxz" role="link" href="https://docs.databricks.com/aws/en/structured-streaming/checkpoints" rel="noopener noreferrer" data-component-type="typography_link" data-component-id="codegen_webapp_js_genai_util_markdown.tsx_71" aria-disabled="false" target="_blank"&gt;exactly-once processing guarantee&lt;/A&gt;. Combined with an idempotent sink like Delta Lake, it ensures every record is processed once and only once, even through failures. This is critical for pipelines where duplicates or missing records have real business consequences, like financial transactions, inventory updates, or customer event tracking.&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-zj8sjw" data-genai-markdown-block="true"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-zj8sjw" data-genai-markdown-block="true"&gt;A few things worth keeping in mind as you build:&lt;/DIV&gt;
&lt;UL class="css-0"&gt;
&lt;LI&gt;Every streaming query needs its own unique checkpoint location. Never share a checkpoint between two different queries.&lt;/LI&gt;
&lt;LI&gt;Deleting or changing the checkpoint directory resets the query, so it starts fresh from the beginning.&lt;/LI&gt;
&lt;LI&gt;Certain changes to your query logic (like modifying stateful operations) are not compatible with an existing checkpoint and require starting with a new one. The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="du-bois-light-typography css-1zhnxz" role="link" href="https://docs.databricks.com/aws/en/structured-streaming/checkpoints" rel="noopener noreferrer" data-component-type="typography_link" data-component-id="codegen_webapp_js_genai_util_markdown.tsx_71" aria-disabled="false" target="_blank"&gt;Structured Streaming checkpoints&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;docs cover exactly which changes are safe and which are not.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;If you are just getting started, the&amp;nbsp;&lt;/SPAN&gt;&lt;A class="du-bois-light-typography css-1zhnxz" role="link" href="https://docs.databricks.com/aws/en/structured-streaming/tutorial" rel="noopener noreferrer" data-component-type="typography_link" data-component-id="codegen_webapp_js_genai_util_markdown.tsx_71" aria-disabled="false" target="_blank"&gt;Run your first Structured Streaming workload&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;tutorial walks through a complete example with checkpointing. For production pipelines, also check out&amp;nbsp;&lt;/SPAN&gt;&lt;A class="du-bois-light-typography css-1zhnxz" role="link" href="https://docs.databricks.com/aws/en/structured-streaming/production" rel="noopener noreferrer" data-component-type="typography_link" data-component-id="codegen_webapp_js_genai_util_markdown.tsx_71" aria-disabled="false" target="_blank"&gt;Production considerations for Structured Streaming&lt;/A&gt;&lt;SPAN&gt;, which covers how to configure automatic restarts so your pipeline recovers from failures without manual intervention.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;FONT size="2" color="#FF6600"&gt;&lt;STRONG&gt;&lt;I&gt;If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.&lt;/I&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sun, 06 Sep 2026 13:22:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/what-is-a-checkpoint-in-structured-streaming/m-p/167695#M55762</guid>
      <dc:creator>Ashwin_DSA</dc:creator>
      <dc:date>2026-09-06T13:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: What is a Checkpoint in Structured Streaming?</title>
      <link>https://community.databricks.com/t5/data-engineering/what-is-a-checkpoint-in-structured-streaming/m-p/167696#M55763</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/250070"&gt;@gowri_databrick&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Checkpoints in Structured Streaming serve as the &lt;STRONG&gt;ledger&lt;/STRONG&gt; and &lt;STRONG&gt;recovery&lt;/STRONG&gt; mechanism for streaming queries. It tracks which data has been processed and successfully written, enabling exactly once processing guarantees. A checkpoint contains several key components: &lt;STRONG&gt;offsets&lt;/STRONG&gt; (which records to process), &lt;STRONG&gt;commits&lt;/STRONG&gt; (which batches completed successfully) and &lt;STRONG&gt;metadata&lt;/STRONG&gt; about the stream. When your customer transactions pipeline processes data, Spark writes the &lt;STRONG&gt;offset&lt;/STRONG&gt;&amp;nbsp;&lt;STRONG&gt;before&lt;/STRONG&gt; starting a batch and writes the &lt;STRONG&gt;commit&lt;/STRONG&gt;&amp;nbsp;&lt;STRONG&gt;after&lt;/STRONG&gt; the batch completes. This two-phase approach ensures that if the pipeline crashes mid-batch, Spark knows precisely where to resume.&lt;/P&gt;&lt;P&gt;When an unexpected failure occurs, the checkpoint enables &lt;STRONG&gt;automatic recovery&lt;/STRONG&gt; without &lt;STRONG&gt;data loss&lt;/STRONG&gt; or &lt;STRONG&gt;duplication&lt;/STRONG&gt;. Upon restart, &lt;STRONG&gt;Spark&lt;/STRONG&gt; reads the &lt;STRONG&gt;checkpoint&lt;/STRONG&gt; and discovers the &lt;STRONG&gt;last committed offset&lt;/STRONG&gt;. If a batch started but didn't complete (offset exists but no matching commit), Spark automatically &lt;STRONG&gt;reprocesses&lt;/STRONG&gt; that batch. For your transactions example, if the pipeline crashes while processing transactions 1000-1500, the checkpoint shows offset 1000 was started but never committed. On restart, Spark reprocesses from transaction 1000 onward ensuring no transactions are lost or duplicated. This fault tolerance is critical in pipelines where stopping to manually determine restart positions would cause data gaps and operational overhead.&lt;/P&gt;</description>
      <pubDate>Sun, 06 Sep 2026 13:23:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/what-is-a-checkpoint-in-structured-streaming/m-p/167696#M55763</guid>
      <dc:creator>balajij8</dc:creator>
      <dc:date>2026-09-06T13:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: What is a Checkpoint in Structured Streaming?</title>
      <link>https://community.databricks.com/t5/data-engineering/what-is-a-checkpoint-in-structured-streaming/m-p/167820#M55779</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/250070"&gt;@gowri_databrick&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, checkpoints are basically how Structured Streaming remembers where it got to.&lt;/P&gt;&lt;P&gt;For example, imagine a streaming pipeline processing customer transactions:&lt;/P&gt;&lt;P&gt;Source → Structured Streaming → Delta table&lt;/P&gt;&lt;P&gt;Suppose the pipeline has processed transactions up to transaction 10,000, and then the cluster suddenly stops.&lt;/P&gt;&lt;P&gt;The checkpoint stores the progress information, so when the pipeline starts again, it can understand what has already been processed and continue from the appropriate point rather than starting from the beginning.&lt;/P&gt;&lt;P&gt;So, in simple terms:&lt;/P&gt;&lt;P&gt;Checkpoint = the streaming pipeline's saved progress&lt;/P&gt;&lt;P&gt;This is important because in a real-time pipeline, we don't want to lose data or process the same data unnecessarily every time there is a restart or failure.&lt;/P&gt;&lt;P&gt;One important point is that the checkpoint location should be persistent and stable. It shouldn't be stored somewhere that gets deleted when the cluster restarts.&lt;/P&gt;&lt;P&gt;A simple example would be:&lt;/P&gt;&lt;P&gt;10,000 transactions processed → pipeline fails → restart → checkpoint helps resume from the saved progress&lt;/P&gt;&lt;P&gt;That's why checkpoints are an important part of reliable Structured Streaming pipelines.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2026 17:13:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/what-is-a-checkpoint-in-structured-streaming/m-p/167820#M55779</guid>
      <dc:creator>srini_ve</dc:creator>
      <dc:date>2026-09-07T17:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: What is a Checkpoint in Structured Streaming?</title>
      <link>https://community.databricks.com/t5/data-engineering/what-is-a-checkpoint-in-structured-streaming/m-p/167834#M55780</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/250070"&gt;@gowri_databrick&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Think of the checkpoint as a bookmark for your stream.&lt;/P&gt;&lt;P&gt;As your query runs, it writes down two things: which data it has already read from the source, and the state it has built up so far, like running counts or aggregations.&lt;/P&gt;&lt;P&gt;So with your transactions example, say the stream has processed everything up to file 500 and then the cluster dies. When you restart, Spark reads the checkpoint, sees that it got through file 500, and picks up at 501. No gap, and nothing gets processed twice. Without a checkpoint it would either start over from scratch or start from now and silently lose everything in between.&lt;/P&gt;&lt;P&gt;That is really the whole point: exactly once processing across restarts. Streams do not run forever without interruption. Clusters restart, jobs get redeployed, code gets updated. The checkpoint is what makes those interruptions boring instead of a data quality incident.&lt;/P&gt;&lt;P&gt;Two practical things worth knowing. Each streaming query needs its own checkpoint location, because sharing one between two queries will break them. And do not delete the checkpoint directory when a stream misbehaves. It is tempting, but it wipes the bookmark, so you will either reprocess everything or lose data.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2026 19:45:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/what-is-a-checkpoint-in-structured-streaming/m-p/167834#M55780</guid>
      <dc:creator>Islam_hoti</dc:creator>
      <dc:date>2026-09-07T19:45:07Z</dc:date>
    </item>
  </channel>
</rss>

