
Answer-first summary for fast verification
Answer: SELECT * FROM students@v4, SELECT * FROM students TIMESTAMP AS OF ‘2024-04-22T 14:32:47.000+00:00’
The question asks for commands to query the table as it existed before the UPDATE operation. Based on Delta Lake time travel syntax and the community discussion consensus (86% selected AB with upvoted comments supporting this), the correct answers are A and B. Option A (SELECT * FROM students@v4) is valid shorthand syntax equivalent to VERSION AS OF 4, as confirmed in the Databricks documentation and community comments. Option B uses TIMESTAMP AS OF with a valid timestamp format to query the table state before the UPDATE. Option C is incorrect because FROM HISTORY VERSION AS OF is not valid syntax. Option D (VERSION AS OF 5) would query version 5, which may be after the UPDATE. Option E uses a timestamp that might be after the UPDATE operation, making it unsuitable for querying the state before the UPDATE.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
DESCRIBE HISTORY students;
The Delta transaction log for the 'students' table is shown using the DESCRIBE HISTORY students command. A Data Engineer needs to query the table as it existed before the UPDATE operation listed in the log.
Which command should the Data Engineer use to achieve this? (Choose two.)

A
SELECT * FROM students@v4
B
SELECT * FROM students TIMESTAMP AS OF ‘2024-04-22T 14:32:47.000+00:00’
C
SELECT * FROM students FROM HISTORY VERSION AS OF 3
D
SELECT * FROM students VERSION AS OF 5
E
SELECT * FROM students TIMESTAMP AS OF ‘2024-04-22T 14:32:58.000+00:00’
No comments yet.