Skip to content

Commit

Permalink
Docs: Add WHEN NOT MATCHED BY SOURCE to Spark doc (#11636)
Browse files Browse the repository at this point in the history
  • Loading branch information
hussein-awala authored Nov 25, 2024
1 parent cdd944e commit f7ff0dc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/docs/spark-writes.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ WHEN NOT MATCHED AND s.event_time > still_valid_threshold THEN INSERT (id, count

Only one record in the source data can update any given row of the target table, or else an error will be thrown.

Spark 3.5 added support for `WHEN NOT MATCHED BY SOURCE ... THEN ...` to update or delete rows that are not present in the source data:

```sql
WHEN NOT MATCHED BY SOURCE THEN UPDATE SET status = 'invalid'
```

### `INSERT OVERWRITE`

Expand Down

0 comments on commit f7ff0dc

Please sign in to comment.