
Answer-first summary for fast verification
Answer: A command `VACUUM table_name RETAIN 0` was run on the table.
The most likely reason you can't access yesterday's version of the table using time travel is that a `VACUUM table_name RETAIN 0` command was executed on the table. This command reclaims disk space by deleting old files not referenced by the current table version, including those needed for time travel. Other options are less likely because: - Time travel being disabled would prevent `DESCRIBE HISTORY` from showing updates. - Delta Lake doesn't automatically clean historical data every 180 days. - Lack of permissions wouldn't explain seeing the table's history with `DESCRIBE HISTORY`. To confirm, check for recent `VACUUM` operations in the table's history or review data retention settings.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
While investigating a data issue, you attempted to review yesterday's version of a table using the command SELECT * FROM table_name TIMESTAMP AS OF date_sub(current_date(), 1). However, you discovered that you could no longer access the historical data, despite the table history (DESCRIBE HISTORY table_name) showing updates from yesterday. What could be the reason for this inability to access the historical data?
A
You currently do not have access to view historical data.
B
By default, historical data is cleaned every 180 days in DELTA.
C
A command VACUUM table_name RETAIN 0 was run on the table.
D
Time travel is disabled.
E
Time travel must be enabled before you query previous data.