While investigating a data issue in a Delta table, you wanted to review logs to see when and who updated the table, what is the best way to review this data?

While investigating a data issue in a Delta table, you wanted to review logs to see when and who updated the table, what is the best way to review this data?
A . Review event logs in the Workspace
B. Run SQL SHOW HISTORY table_name
C. Check Databricks SQL Audit logs
D. Run SQL command DESCRIBE HISTORY table_name
E. Review workspace audit logs

Answer: C

Explanation:

The answer is Run SQL command DESCRIBE HISTORY table_name.

here is the sample data of how DESCRIBE HISTORY table_name looks

✑ +——-+——————-+——+——–+———+——————–+—-+——–+———+

✑ |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… |

+ ——-+——————- + ——+——– +——— +——————– +—-+——– +——— +

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments