
Answer-first summary for fast verification
Answer: Overwriting a table results in a clean table history for logging and audit purposes.
## Explanation Let's analyze each option: **A. Overwriting a table is efficient because no files need to be deleted.** - **CORRECT** - When you overwrite a table in Databricks, the old data files are not immediately deleted. Instead, they are marked for deletion and handled by the garbage collection process. This is more efficient than manually deleting files. **B. Overwriting a table results in a clean table history for logging and audit purposes.** - **INCORRECT** (This is the answer) - Actually, overwriting a table creates a new version in the table history, while deleting and recreating would create a completely new table with a different table ID. Overwriting maintains the same table ID with version history, which is actually better for audit trails and logging purposes. **C. Overwriting a table maintains the old version of the table for Time Travel.** - **CORRECT** - When you overwrite a Delta table, the previous version is preserved and accessible through Time Travel features, allowing you to query historical data. **D. Overwriting a table is an atomic operation and will not leave the table in an unfinished state.** - **CORRECT** - Overwrite operations in Delta Lake are atomic - they either complete fully or not at all, preventing partial or corrupted table states. **E. Overwriting a table allows for concurrent queries to be completed while in progress.** - **CORRECT** - Delta Lake's transaction log ensures that readers can continue to query the previous version of the table while an overwrite operation is in progress, maintaining data consistency. **Key Insight:** Option B is incorrect because overwriting a table actually provides BETTER table history tracking than deleting and recreating. When you delete and recreate a table, you lose the historical lineage and get a completely new table ID, making audit trails more difficult to follow. Overwriting maintains the same table identity with versioned history, which is superior for logging and audit purposes.
Author: Keng Suppaseth
Ultimate access to all questions.
No comments yet.
A data engineer is overwriting data in a table by deleting the table and recreating the table. Another data engineer suggests that this is inefficient and the table should simply be overwritten instead. Which of the following reasons to overwrite the table instead of deleting and recreating the table is incorrect?
A
Overwriting a table is efficient because no files need to be deleted.
B
Overwriting a table results in a clean table history for logging and audit purposes.
C
Overwriting a table maintains the old version of the table for Time Travel.
D
Overwriting a table is an atomic operation and will not leave the table in an unfinished state.
E
Overwriting a table allows for concurrent queries to be completed while in progress.