pyspark.sql.MergeIntoWriter.whenMatched#
- MergeIntoWriter.whenMatched(condition=None)[source]#
Initialize a WhenMatched action with a condition.
This WhenMatched action will be executed when a source row matches a target table row based on the merge condition and the specified condition is satisfied.
- This WhenMatched can be followed by one of the following merge actions:
updateAll: Update all the matched target table rows with source dataset rows.
update(Dict): Update all the matched target table rows while changing only a subset of columns based on the provided assignment.
delete: Delete all target rows that have a match in the source table.