pyspark.sql.MergeIntoWriter.whenNotMatchedBySource#

MergeIntoWriter.whenNotMatchedBySource(condition=None)[source]#

Initialize a WhenNotMatchedBySource action with a condition.

This WhenNotMatchedBySource action will be executed when a target row does not match any rows in the source table based on the merge condition and the specified condition is satisfied.

This WhenNotMatchedBySource can be followed by one of the following merge actions:
  • updateAll: Update all the not matched target table rows with source dataset rows.

  • update(Dict): Update all the not matched target table rows while changing only the specified columns based on the provided assignment.

  • delete: Delete all target rows that have no matches in the source table.