Databricks Certified Data Engineer - Associate

Databricks Certified Data Engineer - Associate

Get started today

Ultimate access to all questions.


When investigating a data issue in a Delta table and needing to review logs to identify when and by whom the table was updated, what is the most effective method?





Explanation:

The correct answer is to execute the SQL command DESCRIBE HISTORY table_name. This command provides a detailed history of operations performed on the Delta table, including timestamps, user information, operation types, and metrics. Here's an example of the output format:

+-------+---------------------+------+---------+-----------+---------------------+-----+---------+----------+------------+--------------+-------------+---------------------+ |version| timestamp|userId|userName|operation| operationParameters| job|notebook|clusterId|readVersion|isolationLevel|isBlindAppend| operationMetrics| +-------+---------------------+------+---------+-----------+---------------------+-----+---------+----------+------------+--------------+-------------+---------------------+ | 5|2019-07-29 14:07:47| null| null| DELETE|[predicate -> ["(...|null| null| null| 4| Serializable| false|[numTotalRows -> ...| | 4|2019-07-29 14:07:41| null| null| UPDATE|[predicate -> (id...|null| null| null| 3| Serializable| false|[numTotalRows -> ...| | 3|2019-07-29 14:07:29| null| null| DELETE|[predicate -> ["(...|null| null| null| 2| Serializable| false|[numTotalRows -> ...| | 2|2019-07-29 14:06:56| null| null| UPDATE|[predicate -> (id...|null| null| null| 1| Serializable| false|[numTotalRows -> ...| | 1|2019-07-29 14:04:31| null| null| DELETE|[predicate -> ["(...|null| null| null| 0| Serializable| false|[numTotalRows -> ...| | 0|2019-07-29 14:01:40| null| null| WRITE|[mode -> ErrorIfE...|null| null| null| null| Serializable| true|[numFiles -> 2, n...| +-------+---------------------+------+---------+-----------+---------------------+-----+---------+----------+------------+--------------+-------------+---------------------+