Exam4Training

While investigating a data issue, you wanted to review yesterday’s version of the table using below command, while querying the previous version of the table using time travel you realized that you are no longer able to view the historical data in the table and you could see it the table was updated yesterday based on the table history(DESCRIBE HISTORY table_name) command what could be the reason why you can not access this data?

While investigating a data issue, you wanted to review yesterday’s version of the table using below command, while querying the previous version of the table using time travel you realized that you are no longer able to view the historical data in the table and you could see it the table was updated yesterday based on the table history(DESCRIBE HISTORY table_name) command what could be the reason why you can not access this data?

SELECT * FROM table_name TIMESTAMP AS OF date_sub(current_date(), 1)
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 ran on the table
D. Time travel is disabled
E. Time travel must be enabled before you query previous data

Answer: C

Explanation:

The answer is, VACUUM table_name RETAIN 0 was ran

The VACUUM command recursively vacuums directories associated with the Delta table and re-moves data files that are no longer in the latest state of the transaction log for the table and are older than a retention threshold. The default is 7 Days.

When VACUUM table_name RETAIN 0 is ran all of the historical versions of data are lost time travel can only provide the current state.

Exit mobile version