An upsert is a write operation that updates a record if it already exists and inserts it if it does not — a single atomic operation that combines update and insert, keyed on a unique record identifier.

An upsert is a write operation that updates a record if it already exists and inserts it if it does not — a single atomic operation that combines update and insert, keyed on a unique record identifier.