Isi
Honored Contributor III

Hey @chsoni12 ,


Using UC:

Databricks tracks metadata dependencies between the source and the clone. This means:

  • VACUUM on the source table will not delete any data files if they are still referenced by the shallow clone.

  • Even after the retention period, VACUUM only removes files not needed by any Delta table, including the clone.

  • So: your clone remains safe, even if the source table is modified (insert/delete/truncate) or vacuumed.

 

Not using UC:

  • Shallow clones are not protected the same way.

  • If a file is no longer needed by the source table and you run VACUUM, it can be deleted, even if the clone still references it.

  • That would break your clone (queries could fail due to missing files).

 

Some limitations

  • Shallow clones on external tables must be external tables. Shallow clones on managed tables must be managed tables.
  • You cannot use REPLACE or CREATE OR REPLACE to overwrite an existing shallow clone. Instead, DROP the shallow clone and run a new CREATE statement.
  • You cannot nest shallow clones, meaning you cannot make a shallow clone from a shallow clone.

 

References: Databricks Docs 

Hope this helps, 🙂

Isi