Databricks Data Engineer Associate Question 277
Single answerYou are working with a Delta table in Databricks and want to audit the table's transactional history to identify recent updates and deletes. Which command would you use to view a detailed history of all table transactions?
- A
DESCRIBE HISTORY
- B
SHOW TRANSACTIONS
- C
SELECT * FROM
HISTORY - D
DESCRIBE EXTENDED
Show answer and explanation
Correct answer: A
Explanation
To audit the transaction history of a Delta table in Databricks, the DESCRIBE HISTORY command is used. This command provides a detailed overview of all operations performed on the table, including updates, deletes, inserts, and metadata changes. The other options are either invalid or unrelated to viewing table transaction history.
- A. Correct.
Correct. The
DESCRIBE HISTORYcommand retrieves the transaction history of a Delta table, showing details such as operation type, user, timestamp, and version of the table. - B. Incorrect.
Incorrect.
SHOW TRANSACTIONSis not a valid Databricks or Delta Lake command for viewing transaction history. - C. Incorrect.
Incorrect.
SELECT * FROM <table-name> HISTORYis not a valid syntax to review table transactions in Delta Lake. - D. Incorrect.
Incorrect.
DESCRIBE EXTENDEDprovides metadata about the table but does not show detailed transaction history.