Databricks Data Engineer Associate Question 272
Select 3You are working on a Delta Lake table in Databricks and need to identify who made modifications to previous versions of the table. Which of the following actions will help you achieve this goal?
- A
Use the DESCRIBE HISTORY command on the table
- B
Query the Delta table's transaction log directly
- C
Run a SELECT query on the table's schema
- D
Enable Change Data Feed (CDF) for the table
- E
Access the table's audit logs if available
Show answer and explanation
Correct answers: A, B, E
Explanation
To identify who has written previous versions of a Delta table, you can use the DESCRIBE HISTORY command, which provides a user-friendly way to view historical changes and their authors. Alternatively, you can query the Delta transaction log directly for more granular details. If enabled, audit logs in the Databricks environment can also provide such information. Other options, like querying the schema or enabling CDF, do not provide user-specific metadata.
- A. Correct.
The DESCRIBE HISTORY command provides a historical record of changes made to the Delta table, including user IDs or service principals that performed the operations.
- B. Correct.
The Delta table's transaction log contains detailed metadata about changes, including information about writers, but querying it directly requires advanced understanding of the log format.
- C. Incorrect.
Running a SELECT query on the table's schema will only show the table's current schema, not historical changes or authors.
- D. Incorrect.
Enabling Change Data Feed (CDF) allows tracking of data changes at a row level but does not capture information about who made the changes.
- E. Correct.
Audit logs, if set up in your Databricks environment, can provide detailed information about who accessed or modified the table.