Databricks Data Engineer Professional Question 142
Select 3You are working on a Databricks project where you have a Delta Lake table named 'sales_data'. You need to create a clone of this table for testing purposes. A deep clone is created first, and then a shallow clone is created. Which of the following statements accurately describe the behavior of the cloned tables in relation to the source table?
- A
The deep clone creates a full copy of the data and metadata of 'sales_data' at the time of cloning.
- B
The shallow clone only references the metadata and underlying storage of 'sales_data' without copying the data.
- C
Changes made to the source 'sales_data' table after cloning will be reflected in the deep clone.
- D
Changes made to the source 'sales_data' table after cloning will be reflected in the shallow clone.
- E
The deep clone requires less storage compared to the shallow clone.
Show answer and explanation
Correct answers: A, B, D
Explanation
Delta Lake provides two cloning methods: deep clone and shallow clone. A deep clone creates a full, independent copy of both the data and metadata, while a shallow clone references the source table's metadata and storage without copying the data. This makes deep clones storage-intensive but fully independent, whereas shallow clones are storage-efficient and reflect changes made to the source table after cloning.
- A. Correct.
Correct: A deep clone creates an independent copy of both the data and metadata of the source Delta table, making it a full snapshot of the table.
- B. Correct.
Correct: A shallow clone only references the metadata and does not copy the data, making it efficient in terms of storage.
- C. Incorrect.
Incorrect: Changes made to the source table after the deep clone are not reflected in the deep clone, as it is a standalone copy.
- D. Correct.
Correct: Since a shallow clone references the source table's metadata, any changes to the source table after cloning will affect the shallow clone.
- E. Incorrect.
Incorrect: A deep clone copies the full data and metadata, which requires more storage compared to a shallow clone that only references the data.