<?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 Delete on streaming table and starting startingVersion in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/delete-on-streaming-table-and-starting-startingversion/m-p/67959#M33491</link>
    <description>&lt;P&gt;I deleted for mistake some records from a streaming table, and of course, the streaming job stopped working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I restored the table at the version before the delete was done, and attempted to restart the job using the startingVersion to the new version. I did not delete the checkpoint on the first attempt, and the job failed again. As a second attempt, I deleted the checkpoint and the job still did not start, somehow the code was still detecting the deleted rows. Can someone explain to me why did it happen?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Deleting the checkpoint and not passing the startingVersion works, of course. But I see that the checkpoint file reports:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{"sourceVersion":1,"reservoirId":"963e2797-2f22-449a-91c6-c3e3972e4ea5","reservoirVersion":1254,"index":8,"isStartingVersion":true}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why is telling that isStartingVersion true? Did it get the startingVersion I passed? If so, why the job did not start when startVersion was provided?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 May 2024 14:53:34 GMT</pubDate>
    <dc:creator>6502</dc:creator>
    <dc:date>2024-05-02T14:53:34Z</dc:date>
    <item>
      <title>Delete on streaming table and starting startingVersion</title>
      <link>https://community.databricks.com/t5/data-engineering/delete-on-streaming-table-and-starting-startingversion/m-p/67959#M33491</link>
      <description>&lt;P&gt;I deleted for mistake some records from a streaming table, and of course, the streaming job stopped working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I restored the table at the version before the delete was done, and attempted to restart the job using the startingVersion to the new version. I did not delete the checkpoint on the first attempt, and the job failed again. As a second attempt, I deleted the checkpoint and the job still did not start, somehow the code was still detecting the deleted rows. Can someone explain to me why did it happen?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Deleting the checkpoint and not passing the startingVersion works, of course. But I see that the checkpoint file reports:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{"sourceVersion":1,"reservoirId":"963e2797-2f22-449a-91c6-c3e3972e4ea5","reservoirVersion":1254,"index":8,"isStartingVersion":true}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why is telling that isStartingVersion true? Did it get the startingVersion I passed? If so, why the job did not start when startVersion was provided?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2024 14:53:34 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/delete-on-streaming-table-and-starting-startingversion/m-p/67959#M33491</guid>
      <dc:creator>6502</dc:creator>
      <dc:date>2024-05-02T14:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: Delete on streaming table and starting startingVersion</title>
      <link>https://community.databricks.com/t5/data-engineering/delete-on-streaming-table-and-starting-startingversion/m-p/67978#M33502</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/74715"&gt;@6502&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;It appears you've used the `&lt;EM&gt;startingVersion&lt;/EM&gt;` parameter in your streaming query, which causes the stream to begin processing data from the version prior to the DELETE operation version. However, the DELETE operation will still be processed in order, potentially resulting in failures.&lt;/P&gt;
&lt;P&gt;To resolve this issue, consider the following options:&lt;/P&gt;
&lt;P&gt;Roll back your table version to the version before the DELETE operation using time travel.&lt;/P&gt;
&lt;P&gt;(&lt;A href="https://docs.databricks.com/en/delta/history.html#restore-a-delta-table-to-an-earlier-state" target="_blank" rel="noopener"&gt;https://docs.databricks.com/en/delta/history.html#restore-a-delta-table-to-an-earlier-state&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;2. Add the `&lt;EM&gt;ignoreDeletes&lt;/EM&gt;` or `&lt;EM&gt;skipChangeCommits&lt;/EM&gt;` parameter to your query. You can find more information on this in the Databricks documentation.&lt;/P&gt;
&lt;P&gt;(&lt;A href="https://docs.databricks.com/en/structured-streaming/delta-lake.html#ignore-updates-and-deletes" target="_blank" rel="noopener"&gt;https://docs.databricks.com/en/structured-streaming/delta-lake.html#ignore-updates-and-deletes&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Should you have any questions or concerns, please don't hesitate to respond to this message. I'm here to help!&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2024 22:35:22 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/delete-on-streaming-table-and-starting-startingversion/m-p/67978#M33502</guid>
      <dc:creator>raphaelblg</dc:creator>
      <dc:date>2024-05-02T22:35:22Z</dc:date>
    </item>
  </channel>
</rss>

