<?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 Structured Streaming: Choose Watermarks Around Real Arrival Delays in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/structured-streaming-choose-watermarks-around-real-arrival/m-p/175615#M57023</link>
    <description>&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;Structured Streaming: Choose Watermarks Around Real Arrival Delays&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;A practical streaming lesson: measure how late business events arrive before choosing a watermark threshold.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Consider a hypothetical retailer using Azure Databricks to calculate sales in five-minute windows. A customer completes a purchase at 10:05, but the store’s connection fails. The event reaches the platform at 10:40, after newer sales have already arrived.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;With a ten-minute watermark delay, that purchase might arrive too late to update its sales window.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Structured Streaming tracks the maximum observed event timestamp and uses the configured delay to calculate its watermark. Records within the lateness threshold are guaranteed to be processed; records outside it might still be processed, but that is not guaranteed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For this fictional pipeline, I would:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Measure arrival delays across normal operations and store outages.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Choose a threshold that reflects the business’s tolerance for missing late sales.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Retain original events so historical totals can be reconciled separately.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Test delayed events and monitor state growth before production.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;A longer threshold tolerates more late data but retains more state. For windowed aggregations in append mode, it also delays final output.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;How does your team balance timely sales reporting with accepting events delayed by outages?&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Reference: &lt;/SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/structured-streaming/watermarks" target="_blank"&gt;&lt;SPAN&gt;Azure Databricks watermark guidance&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#Databricks #StructuredStreaming #DataEngineering&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Nov 2026 16:27:04 GMT</pubDate>
    <dc:creator>amitsharma1707</dc:creator>
    <dc:date>2026-11-04T16:27:04Z</dc:date>
    <item>
      <title>Structured Streaming: Choose Watermarks Around Real Arrival Delays</title>
      <link>https://community.databricks.com/t5/data-engineering/structured-streaming-choose-watermarks-around-real-arrival/m-p/175615#M57023</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;Structured Streaming: Choose Watermarks Around Real Arrival Delays&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;A practical streaming lesson: measure how late business events arrive before choosing a watermark threshold.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Consider a hypothetical retailer using Azure Databricks to calculate sales in five-minute windows. A customer completes a purchase at 10:05, but the store’s connection fails. The event reaches the platform at 10:40, after newer sales have already arrived.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;With a ten-minute watermark delay, that purchase might arrive too late to update its sales window.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Structured Streaming tracks the maximum observed event timestamp and uses the configured delay to calculate its watermark. Records within the lateness threshold are guaranteed to be processed; records outside it might still be processed, but that is not guaranteed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For this fictional pipeline, I would:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Measure arrival delays across normal operations and store outages.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Choose a threshold that reflects the business’s tolerance for missing late sales.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Retain original events so historical totals can be reconciled separately.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Test delayed events and monitor state growth before production.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;A longer threshold tolerates more late data but retains more state. For windowed aggregations in append mode, it also delays final output.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;How does your team balance timely sales reporting with accepting events delayed by outages?&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Reference: &lt;/SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/structured-streaming/watermarks" target="_blank"&gt;&lt;SPAN&gt;Azure Databricks watermark guidance&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#Databricks #StructuredStreaming #DataEngineering&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2026 16:27:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/structured-streaming-choose-watermarks-around-real-arrival/m-p/175615#M57023</guid>
      <dc:creator>amitsharma1707</dc:creator>
      <dc:date>2026-11-04T16:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: Structured Streaming: Choose Watermarks Around Real Arrival Delays</title>
      <link>https://community.databricks.com/t5/data-engineering/structured-streaming-choose-watermarks-around-real-arrival/m-p/177216#M57264</link>
      <description>&lt;DIV&gt;&lt;P&gt;In one of my previous implementations, we took a slightly different approach. Rather than relying on watermarks at the ingestion layer, we treated the &lt;STRONG&gt;Bronze layer as a complete system of record&lt;/STRONG&gt; and used a blind append pattern to capture every event, regardless of how late it arrived.&lt;/P&gt;&lt;P&gt;The reason is that watermark-based aggregations can eventually drop records that arrive later than the configured threshold. While this helps manage state size and processing efficiency, it also introduces the risk of missing legitimate business events during prolonged outages or upstream delays.&lt;/P&gt;&lt;P&gt;Instead, we ingested all events into Bronze without applying watermark-driven filtering. From there, we used &lt;STRONG&gt;readStream&lt;/STRONG&gt; to process data into the Silver layer, where data quality rules, validations, deduplication logic, and business transformations were applied. This approach allowed us to maintain streaming performance while ensuring that no source records were lost.&lt;/P&gt;&lt;P&gt;My preference is to optimize for &lt;STRONG&gt;data completeness at ingestion&lt;/STRONG&gt; and handle quality, reconciliation, and business rules downstream. That provides a stronger foundation for auditing, replayability, and recovery from unexpected delays without sacrificing the benefits of a streaming architecture.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 22 Nov 2026 04:32:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/structured-streaming-choose-watermarks-around-real-arrival/m-p/177216#M57264</guid>
      <dc:creator>saisaranv</dc:creator>
      <dc:date>2026-11-22T04:32:35Z</dc:date>
    </item>
  </channel>
</rss>

