Databricks Data Engineer Associate Question 268
Single answerYou are working on a Delta Lake table in Databricks and need to identify who made changes to a previous version of the table. Which of the following actions would allow you to retrieve this information?
- A
Use the DESCRIBE HISTORY command on the table
- B
Query the _delta_log JSON files directly in the table directory
- C
Run the SHOW CHANGES command on the table
- D
Check the table's schema using the DESCRIBE SCHEMA command
Show answer and explanation
Correct answer: A
Explanation
To identify who made changes to a previous version of a Delta Lake table, the DESCRIBE HISTORY command is the appropriate option. This command provides a detailed history of table operations, including the user identifier, timestamps, and operation types. While other options may provide partial or unrelated information, only DESCRIBE HISTORY is specifically designed for this purpose.
- A. Correct.
The DESCRIBE HISTORY command provides a history of table operations, including details such as the user who made the changes, timestamps, and operation types.
- B. Incorrect.
While the _delta_log files contain metadata about table changes, directly querying them is not a recommended practice and requires significant manual effort to parse the data.
- C. Incorrect.
The SHOW CHANGES command does not exist in Databricks. This is an invalid option.
- D. Incorrect.
DESCRIBE SCHEMA only provides metadata about the table's schema, such as column names and types. It does not provide version history or user details.