Deletes target rows that match source rows.
Method arguments
The method for DeltaMergeBuilder accepts:
- predicate
Optional character. Additional predicate to filter which matched rows should be deleted.
Examples
if (FALSE) { # \dontrun{
# Delete all matched rows
delta_merge(table, source, "target.id = source.id") |>
when_matched_delete()
# Delete matched rows where a condition is met
delta_merge(table, source, "target.id = source.id") |>
when_matched_delete(predicate = "source.deleted = true")
} # }