byrdman
New Contributor III

if you are using 'delta.columnMapping.mode' = 'name' on your table i could not get it to work, without that line .. for the not matched .. WHEN NOT MATCHED 

 THEN INSERT (columnname,columnName2) values(columnname,columnName2)

WHEN MATCHED 

Then UPDATE SET (target.columnname = source.columnname,target.columnname2 = source.columnname2) That worked for me.. Leave the id column out of any of these