cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

What's the difference between a Delta deep clone vs shallow clone?

User16826992666
Valued Contributor
 
1 ACCEPTED SOLUTION

Accepted Solutions

sajith_appukutt
Honored Contributor II

Shallow clone: only duplicates the metadata of the table being cloned; the data files of the table itself are not copied. These clones are cheaper to create but are  not self-contained and depend on the source from which they were cloned as the source of data. If the files in the source that the clone depends on are removed, for example with VACUUM, a shallow clone may become unusable. Therefore, shallow clones are typically used for short-lived use cases such as testing and experimentation.

Deep clone: A deep clone makes a full copy of the metadata and data files of the table being cloned. In that sense it is similar in functionality to copying with a CTAS command- but it is simpler to specify 

View solution in original post

1 REPLY 1

sajith_appukutt
Honored Contributor II

Shallow clone: only duplicates the metadata of the table being cloned; the data files of the table itself are not copied. These clones are cheaper to create but are  not self-contained and depend on the source from which they were cloned as the source of data. If the files in the source that the clone depends on are removed, for example with VACUUM, a shallow clone may become unusable. Therefore, shallow clones are typically used for short-lived use cases such as testing and experimentation.

Deep clone: A deep clone makes a full copy of the metadata and data files of the table being cloned. In that sense it is similar in functionality to copying with a CTAS command- but it is simpler to specify 

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.