pyspark.sql.MergeIntoWriter.whenNotMatched#

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

Initialize a WhenNotMatched action with a condition.

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

This WhenNotMatched can be followed by one of the following merge actions:
  • insertAll: Insert all rows from the source that are not already in the target table.

  • insert(Dict): Insert all rows from the source that are not already in the target table, with the specified columns based on the provided assignment.