QuestionQ265

VerifiedData Governance & Quality

A data engineer needs to audit who made changes to a Delta table over the past 7 days.

Which SQL statement returns the record of past operations, including timestamps, users, and operation types?

Explanation

The DESCRIBE HISTORY command in Delta Lake returns the operation history of a table as a Delta Lake transaction log audit trail, including columns such as version, timestamp, userName, operation, and operationParameters. This makes it the correct tool for auditing who performed which changes and when. DESCRIBE DETAIL only returns table metadata (e.g., location, format, size, partition columns) without operation-level audit information. SHOW TBLPROPERTIES lists configured table properties, not change history. Directly selecting from the _delta_log path is not valid SQL for querying transaction log history in a structured, human-readable way.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!