
Answer-first summary for fast verification
Answer: The VACUUM command was run on the table
The VACUUM command removes data files that are no longer referenced by a Delta table and are older than the retention threshold. By default, VACUUM removes files older than 7 days, but this can be configured. When VACUUM is run, it physically deletes the data files from storage, which makes time travel to versions older than the retention period impossible. Key points: 1. **VACUUM purpose**: Removes unused data files that are no longer part of the current table version 2. **Default retention**: 7 days (configurable with `RETAIN` option) 3. **Impact on time travel**: Once files are vacuumed, time travel to versions older than the retention period fails 4. **Other options analysis**: - B: There is no TIME TRAVEL command in Delta Lake - C: There is no DELETE HISTORY command in Delta Lake - D: OPTIMIZE compacts small files but doesn't affect time travel - E: HISTORY shows table history but doesn't delete files **Best practice**: Always check retention periods before running VACUUM and consider using `DRY RUN` to see what files would be deleted.
Author: Keng Suppaseth
Ultimate access to all questions.
A data engineer has realized that they made a mistake when making a daily update to a table. They need to use Delta time travel to restore the table to a version that is 3 days old. However, when the data engineer attempts to time travel to the older version, they are unable to restore the data because the data files have been deleted. Which of the following explains why the data files are no longer present?
A
The VACUUM command was run on the table
B
The TIME TRAVEL command was run on the table
C
The DELETE HISTORY command was run on the table
D
The OPTIMIZE command was run on the table
E
The HISTORY command was run on the table
No comments yet.