Hi @shan-databricks ,
There is no out of the box mechanism to do that. You need to implement your own custom logic to handle that scenario.
There are some thing in delta protocol that can make your life easier like schema evolution.
Schema evolution allows you to resolve schema mismatches between the target and source table in merge. It handles the following two cases:
A column exists in the source table but not the target table.
That column will be added to the target schema, and its values will be populated from the corresponding column in the source.
This only applies when the column name and structure in the merge source exactly match the target assignment.
The new column must be directly assigned from the source, without expressions, renaming, or transformations.
A column exists in the target table but not the source table.
The target schema is not changed. These columns:
Are left unchanged for UPDATE SET *.
Are set to NULL for INSERT *.
May still be explicitly modified if assigned in the action clause.
But still you have to write logic that will update older records, because they will contain NULL values.