Hello. During some example cases we were running, in order to identify how Databricks treats possible wrong actions we could make, we noticed that merge doesn't fail while inserting different data type values from the ones in the corresponding table. Please find the example below:
Target table schema
View used to update target table
Here you can see that we accidentally inserted the Status values in the Eff_Dt column (Date data type)
Merge along with the success result
Target table after the result
You can see that rows 10 & 11 inserted in the table without failing but with null value in EFF_DT (date type while we tried to insert string values). We would expect the merge to fail and not complete any of the DML actions. Moreover, we noticed that in this case in the identity column, id #9 was skipped.
Is this behavior expected? Could you please provide any insight? Thank you in advance