<?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 Deleting Records from DLT Bronze and Silver Tables in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/deleting-records-from-dlt-bronze-and-silver-tables/m-p/91741#M38253</link>
    <description>&lt;P class=""&gt;I have a pipeline that generates two DLT streaming tables: a Bronze table and a Silver table. I need to delete specific records from both tables. I've read an article (&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;A class="" title="https://www.databricks.com/blog/handling-right-be-forgotten-gdpr-and-ccpa-using-delta-live-tables-dlt" href="https://www.databricks.com/blog/handling-right-be-forgotten-gdpr-and-ccpa-using-delta-live-tables-dlt" target="_blank" rel="noreferrer noopener"&gt;https://www.databricks.com/blog/handling-right-be-forgotten-gdpr-and-ccpa-using-delta-live-tables-dlt&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;) suggesting that with two streaming tables, the only option is to delete the data in the Bronze table and then perform a full refresh of the Silver table.&lt;/P&gt;&lt;P class=""&gt;However, the Silver table is very large, and I'd like to avoid a full refresh. Are there any alternative solutions available?&lt;/P&gt;&lt;P class=""&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 25 Sep 2024 15:01:07 GMT</pubDate>
    <dc:creator>Gianfranco</dc:creator>
    <dc:date>2024-09-25T15:01:07Z</dc:date>
    <item>
      <title>Deleting Records from DLT Bronze and Silver Tables</title>
      <link>https://community.databricks.com/t5/data-engineering/deleting-records-from-dlt-bronze-and-silver-tables/m-p/91741#M38253</link>
      <description>&lt;P class=""&gt;I have a pipeline that generates two DLT streaming tables: a Bronze table and a Silver table. I need to delete specific records from both tables. I've read an article (&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;A class="" title="https://www.databricks.com/blog/handling-right-be-forgotten-gdpr-and-ccpa-using-delta-live-tables-dlt" href="https://www.databricks.com/blog/handling-right-be-forgotten-gdpr-and-ccpa-using-delta-live-tables-dlt" target="_blank" rel="noreferrer noopener"&gt;https://www.databricks.com/blog/handling-right-be-forgotten-gdpr-and-ccpa-using-delta-live-tables-dlt&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;) suggesting that with two streaming tables, the only option is to delete the data in the Bronze table and then perform a full refresh of the Silver table.&lt;/P&gt;&lt;P class=""&gt;However, the Silver table is very large, and I'd like to avoid a full refresh. Are there any alternative solutions available?&lt;/P&gt;&lt;P class=""&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 15:01:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/deleting-records-from-dlt-bronze-and-silver-tables/m-p/91741#M38253</guid>
      <dc:creator>Gianfranco</dc:creator>
      <dc:date>2024-09-25T15:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Records from DLT Bronze and Silver Tables</title>
      <link>https://community.databricks.com/t5/data-engineering/deleting-records-from-dlt-bronze-and-silver-tables/m-p/92508#M38456</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/119378"&gt;@Gianfranco&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;How are you doing it today?&lt;/P&gt;&lt;P&gt;As per my understanding,&amp;nbsp;Consider &lt;STRONG&gt;using a selective delete&lt;/STRONG&gt; approach on both the Bronze and Silver tables to avoid a full refresh. Instead of deleting data and refreshing the entire Silver table, you could &lt;STRONG&gt;delete the specific records in both tables&lt;/STRONG&gt; by writing an appropriate delete query directly against each Delta table. This way, you're only removing the required records without needing to rebuild the Silver table from scratch. Another option might be to &lt;STRONG&gt;implement Change Data Capture (CDC)&lt;/STRONG&gt;, so you can track and update only the affected records, reducing the need for full table operations. Additionally, explore using &lt;STRONG&gt;vacuum&lt;/STRONG&gt; or &lt;STRONG&gt;optimize&lt;/STRONG&gt; commands to maintain table performance after deletions.&lt;/P&gt;&lt;P&gt;Give a try and see if it works.&lt;/P&gt;&lt;P&gt;Good day.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Brahma&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 03:58:12 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/deleting-records-from-dlt-bronze-and-silver-tables/m-p/92508#M38456</guid>
      <dc:creator>Brahmareddy</dc:creator>
      <dc:date>2024-10-02T03:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Records from DLT Bronze and Silver Tables</title>
      <link>https://community.databricks.com/t5/data-engineering/deleting-records-from-dlt-bronze-and-silver-tables/m-p/92530#M38458</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/119378"&gt;@Gianfranco&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Try APPLY CHANGES. This will work well in your scenario, as it supports DELETE operation as well:&lt;BR /&gt;&lt;A href="https://docs.databricks.com/en/delta-live-tables/cdc.html" target="_blank"&gt;https://docs.databricks.com/en/delta-live-tables/cdc.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 06:40:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/deleting-records-from-dlt-bronze-and-silver-tables/m-p/92530#M38458</guid>
      <dc:creator>filipniziol</dc:creator>
      <dc:date>2024-10-02T06:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Records from DLT Bronze and Silver Tables</title>
      <link>https://community.databricks.com/t5/data-engineering/deleting-records-from-dlt-bronze-and-silver-tables/m-p/103376#M41423</link>
      <description>&lt;P&gt;Remove records using the DELETE operation in both Bronze &amp;amp; Silver tables.&lt;/P&gt;&lt;P&gt;After doing each delete step, you can Optimize the table which rewrites the parquet files for that table behind the scenes to improve the data layout (Read more about optimize here: &lt;A href="https://learn.microsoft.com/en-us/azure/databricks/sql/language-manual/delta-optimize" target="_blank"&gt;https://learn.microsoft.com/en-us/azure/databricks/sql/language-manual/delta-optimize&lt;/A&gt;). It is a simple command: &lt;STRONG&gt;&lt;EM&gt;OPTIMIZE &amp;lt;Table Name&amp;gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Also, as you move on in this process, you can run the VACUUM command to clean up old versions of the data and free up storage space: &lt;A href="https://learn.microsoft.com/en-us/azure/databricks/sql/language-manual/delta-vacuum" target="_blank"&gt;https://learn.microsoft.com/en-us/azure/databricks/sql/language-manual/delta-vacuum&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Dec 2024 04:29:44 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/deleting-records-from-dlt-bronze-and-silver-tables/m-p/103376#M41423</guid>
      <dc:creator>karthickrs</dc:creator>
      <dc:date>2024-12-28T04:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Records from DLT Bronze and Silver Tables</title>
      <link>https://community.databricks.com/t5/data-engineering/deleting-records-from-dlt-bronze-and-silver-tables/m-p/169018#M56024</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/119378"&gt;@Gianfranco&lt;/a&gt;&amp;nbsp;, a bit late to the conversation, here is what i suggest.&lt;BR /&gt;If you are woking with Stream tables, I would suggest you make a CDF feed for the bronze tables.&lt;BR /&gt;Why? there are 2 reasons:&lt;BR /&gt;1. This makes sure that if a record is deleted in raw, a CDC row marking that row as DELETED is generated with delete tag in the CDF feed&lt;BR /&gt;2. CDF feed will be append only, Which can be directly used as a stream source for the silver table (Actually its a streaming condition, for stream the source should be append only, So if you delete row from raw table, that pact is broken as spark will see that delete operation in transaction log and throw error, Thus making CDF even more necessary)&lt;BR /&gt;&lt;BR /&gt;Now, the record that you have deleted will arrive in the Silver logic, there you will do -&amp;gt; MERGE + DELETE if operation = 'delete', query in the foreachBatch.&lt;BR /&gt;&lt;BR /&gt;This was your deleted record's info is propagated and gets reflected in silver&lt;BR /&gt;&lt;BR /&gt;If you are looking for something adhoc then i think better one it to delete the records and then run OPTIMIZE (to trigger compaction), this is done because for a single record soft delete is implemented (delete vector), to make it hard, you have to excite an action.&lt;BR /&gt;&lt;BR /&gt;hope this helps&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2026 18:54:52 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/deleting-records-from-dlt-bronze-and-silver-tables/m-p/169018#M56024</guid>
      <dc:creator>Arin</dc:creator>
      <dc:date>2026-09-17T18:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Records from DLT Bronze and Silver Tables</title>
      <link>https://community.databricks.com/t5/data-engineering/deleting-records-from-dlt-bronze-and-silver-tables/m-p/169072#M56033</link>
      <description>&lt;P&gt;&lt;STRONG&gt;The core idea:&lt;/STRONG&gt; the reason deleting from Bronze breaks the Silver streaming read isn't Delta itself — it's that Structured Streaming (which DLT streaming tables use under the hood) requires an append-only source by default. Any DELETE/UPDATE on Bronze rewrites files, and the Silver stream chokes on that. skipChangeCommits tells the Silver stream to simply ignore any non-append file changes in Bronze rather than fail or force a full recompute.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Steps:&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Delete the target records from the Bronze table using standard DML (DELETE FROM bronze WHERE ...).&lt;/LI&gt;&lt;LI&gt;Delete the same records from the Silver table directly too, using DML — skipChangeCommits stops the stream from breaking on Bronze's deletes, but it doesn't propagate the delete downstream for you. You still need to explicitly delete from Silver yourself.&lt;/LI&gt;&lt;LI&gt;Update the Silver table's streaming read to include .option("skipChangeCommits", "true") so future incremental runs don't choke on the Bronze delete you just made.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;This avoids the full refresh entirely — no full recompute of the large Silver table, just a targeted delete plus a stream option change.&lt;/P&gt;&lt;P&gt;One nuance to flag in your case with two streaming tables specifically: if the article you read is the Databricks GDPR/CCPA blog post, it correctly notes that full refresh is the only option only when you insist on both Bronze and Silver staying pure streaming tables with no other flag set. skipChangeCommits is exactly the escape hatch that changes that constraint — it's mentioned in that same blog as "Solution 1" alongside the full-refresh approach, so worth re-reading that section specifically rather than just the headline full-refresh recommendation.&lt;/P&gt;&lt;P&gt;Also worth doing regardless of which path you pick, since this is a GDPR/CCPA compliance case: a DML delete on Delta by default just marks rows removed via deletion vectors / metadata — the physical data can still exist in files until compaction. To actually purge the underlying bytes:&lt;/P&gt;&lt;P&gt;sql&lt;BR /&gt;REORG TABLE bronze APPLY (PURGE);&lt;BR /&gt;REORG TABLE silver APPLY (PURGE);&lt;BR /&gt;VACUUM bronze;&lt;BR /&gt;VACUUM silver;&lt;/P&gt;&lt;P&gt;Do this after your retention window (default history retention is 30 days) or explicitly shorten it, otherwise the "deleted" PII is still recoverable via time travel until VACUUM runs.&lt;/P&gt;&lt;P&gt;If you want deletes to propagate automatically instead of manually deleting from both tables every time, the longer-term alternative is converting Silver to a Materialized View instead of a streaming table — Databricks' Enzyme incremental-refresh engine can then propagate Bronze deletes into Silver automatically without a full recompute. That's a bigger architectural change than your current pipeline, so I'd only reach for it if you're doing GDPR deletes often enough that the manual two-table delete step becomes a real operational burden.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2026 09:09:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/deleting-records-from-dlt-bronze-and-silver-tables/m-p/169072#M56033</guid>
      <dc:creator>aayush_410</dc:creator>
      <dc:date>2026-09-18T09:09:47Z</dc:date>
    </item>
  </channel>
</rss>

