Finding Inserted OR Appended Rows in DLT Event Logs

agent007
Databricks Partner

In the event logs, is there any parameter for finding the inserted record count, e.g - num_inserted_rows ?

I found these parameters - 

1. num_updated_rows

2. num_deleted_rows

3. num_output_rows
but not num_inserted_rows.


I could not make the logic of inserted_rows = output rows - upserted rows or any other logic, as num_output_rows and num_upserted_rows are not available simultaneously. 

 

Thus, if there is any way to find the num_inserted_rows column please tell. As when we are creating incremental tables, this will help a lot in auditing.

Sidhant07
Databricks Employee
Databricks Employee

Hi,

 Unfortunately, the current DLT event log schema does not provide a built-in way to distinguish between inserted and updated rows in the num_upserted_rows metric.

There is NO num_inserted_rows parameter in DLT event logs. The num_upserted_rows metric combines both inserts and updates together, making it impossible to separate them.

View solution in original post