<?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 Can we do a shallow clone on top of a shallow clone! in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/can-we-do-a-shallow-clone-on-top-of-a-shallow-clone/m-p/158567#M54741</link>
    <description>&lt;P&gt;Case 1 Can we do a shallow clone on top of a shallow clone? If I do so, What would be the result&amp;nbsp;&lt;BR /&gt;Case 2&amp;nbsp; when ever the table over writes with new data how does it work.&lt;BR /&gt;Case 3&amp;nbsp; when a the table is dropped and loaded then how does this scenario effect the shallow cloned table.&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jun 2026 15:53:45 GMT</pubDate>
    <dc:creator>damodhargandha</dc:creator>
    <dc:date>2026-06-08T15:53:45Z</dc:date>
    <item>
      <title>Can we do a shallow clone on top of a shallow clone!</title>
      <link>https://community.databricks.com/t5/data-engineering/can-we-do-a-shallow-clone-on-top-of-a-shallow-clone/m-p/158567#M54741</link>
      <description>&lt;P&gt;Case 1 Can we do a shallow clone on top of a shallow clone? If I do so, What would be the result&amp;nbsp;&lt;BR /&gt;Case 2&amp;nbsp; when ever the table over writes with new data how does it work.&lt;BR /&gt;Case 3&amp;nbsp; when a the table is dropped and loaded then how does this scenario effect the shallow cloned table.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2026 15:53:45 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/can-we-do-a-shallow-clone-on-top-of-a-shallow-clone/m-p/158567#M54741</guid>
      <dc:creator>damodhargandha</dc:creator>
      <dc:date>2026-06-08T15:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: Can we do a shallow clone on top of a shallow clone!</title>
      <link>https://community.databricks.com/t5/data-engineering/can-we-do-a-shallow-clone-on-top-of-a-shallow-clone/m-p/158568#M54742</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/234021"&gt;@damodhargandha&lt;/a&gt;,&lt;/P&gt;
&lt;P class="wnfdntt _1ibi0s3f5 _1ibi0s3ce _1ibi0s3ea" data-pm-slice="1 1 []"&gt;A good way to think about a shallow clone is that it copies the table’s metadata but still points to the source table's data files rather than copying them. Databricks explains that behaviour in the Clone a table " section of the&lt;A href="https://docs.databricks.com/aws/en/delta/clone" rel="noopener noreferrer nofollow" target="_blank"&gt;&amp;nbsp;Databricks&lt;/A&gt; docs.&lt;/P&gt;
&lt;P class="wnfdntt _1ibi0s3f5 _1ibi0s3ce _1ibi0s3ea"&gt;For your first question, no, you can’t create a shallow clone from another shallow clone. That’s explicitly called out as a limitation for Unity Catalog shallow clones in the &lt;A href="https://docs.databricks.com/aws/en/delta/clone-unity-catalog" rel="noopener noreferrer nofollow" target="_blank"&gt;Shallow clone for Unity Catalog tables&lt;/A&gt; documentation, and you’ll also see the same restriction reflected in the public error-class docs.&lt;/P&gt;
&lt;P class="wnfdntt _1ibi0s3f5 _1ibi0s3ce _1ibi0s3ea"&gt;For the second question, if the source table is overwritten with new data, the existing shallow clone does not automatically "move forward" with it. A clone has its own independent history, and time travel on the clone is separate from the source. In other words, the shallow clone continues to represent the snapshot/version it was created from unless you run clone again. The general clone docs cover that behaviour, including the fact that shallow clones reference source files and that cloned tables have an independent history. One important nuance here is file cleanup... outside Unity Catalog, if old source files are later removed by VACUUM, the shallow clone can break with FileNotFoundException.&amp;nbsp;Databricks recommends rerunning the clone with replace in that scenario. In Unity Catalog, VACUUM is shallow-clone aware and tracks referenced files across the source and its clones, so vacuuming the source does not break the clone the same way. See the &lt;A href="https://docs.databricks.com/aws/en/delta/clone" rel="noopener noreferrer nofollow" target="_blank"&gt;general clone docs&lt;/A&gt; and the &lt;A href="https://docs.databricks.com/aws/en/delta/clone-unity-catalog" rel="noopener noreferrer nofollow" target="_blank"&gt;Unity Catalog shallow clone docs&lt;/A&gt;.&lt;/P&gt;
&lt;P class="wnfdntt _1ibi0s3f5 _1ibi0s3ce _1ibi0s3ea"&gt;For the third question, if the base table is dropped, the outcome depends on the table type and catalog. For Unity Catalog managed tables, Databricks blocks the drop by default if shallow clones still reference the base table, unless you explicitly use DROP TABLE ... FORCE. If you force the drop, the referencing shallow clones become broken for operations such as SELECT, INSERT, UPDATE, DESCRIBE HISTORY, and CLONE. That behaviour is documented in both &lt;A href="https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-drop-table" rel="noopener noreferrer nofollow" target="_blank"&gt;DROP TABLE&lt;/A&gt; and &lt;A href="https://docs.databricks.com/aws/en/delta/clone-unity-catalog" rel="noopener noreferrer nofollow" target="_blank"&gt;Shallow clone for Unity Catalog tables&lt;/A&gt;. There is one managed-table nuance. Unity Catalog supports UNDROP TABLE for about 7 days, and during that window, managed shallow clones can continue to work if the source is restored. If it is not restored, the shallow clone stops functioning once garbage collection removes the underlying files.&lt;/P&gt;
&lt;P class="wnfdntt _1ibi0s3f5 _1ibi0s3ce _1ibi0s3ea"&gt;If the source is a Unity Catalog external table, the story is different because DROP TABLE removes the metadata but does not delete the underlying external files, so shallow clones of external tables are not impacted in the same way. Also worth calling out: for Unity Catalog shallow clones, you can’t use REPLACE or CREATE OR REPLACE to overwrite an existing shallow clone; the documented approach is to drop the shallow clone and create it again.&lt;/P&gt;
&lt;P class="wnfdntt _1ibi0s3f5 _1ibi0s3ce _1ibi0s3ea"&gt;Trust this answers your queries.&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;</description>
      <pubDate>Mon, 08 Jun 2026 16:54:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/can-we-do-a-shallow-clone-on-top-of-a-shallow-clone/m-p/158568#M54742</guid>
      <dc:creator>Ashwin_DSA</dc:creator>
      <dc:date>2026-06-08T16:54:14Z</dc:date>
    </item>
  </channel>
</rss>

