Hi @lizou If we do not have any delete condition specified in the merge command's when matched clause, it should not be deleting the data. Was there any vacuum run on the table after which you started facing the issue?
We won't be able to access the notebook without the support ticket. If you don't find any delete condition in the merge command, and no vacuum was run on the table, you may create a support case for further analysis. You can raise support ticket here: https://help.databricks.com/s/