liveBook · Manning

Upsert

An upsert is a data-modification operation that updates a matching record or resource, or inserts it when no match exists.

How 3 Manning books explain it

Architecting an Apache Iceberg Lakehouse

An upsert operation inserts records that are absent and updates records that already exist according to a matching key or condition.

How it is used
Supports transactional ingestion, reconciliation, slowly changing dimensions, late-arriving data, and downstream synchronization.
How deep it goes
Explains matching, snapshot commits, engine responsibilities, and operational tradeoffs without detailing the Iceberg specification.
Examples
Uses a Spark MERGE between a staging table and target, matching records by identifier before updating or inserting.
What you can do after
Apply it via Apache Spark to reconcile staging data with Iceberg tables through conditional updates and inserts.

Read how Architecting an Apache Iceberg Lakehouse explains upsert →

ScyllaDB in Action

An upsert is a write operation that combines insert and update behavior by creating missing data or modifying existing data.

How it is used
Combines ScyllaDB inserts and updates into fast writes for restaurant-review rows.
How deep it goes
Explains syntax, partition-key filtering, preserved columns, and deferred deeper treatment of row liveness.
Examples
Uses an Ernie’s Eats fried-chicken review, UPDATE and INSERT statements, and a SELECT result.
What you can do after
Apply upserts with CQL UPDATE statements while preserving unchanged columns and targeting the partition key.

Read how ScyllaDB in Action explains upsert →

Akka in Action, Second Edition

An upsert is a database operation that inserts a record when no matching record exists and updates the matching record otherwise.

How it is used
Stores projected aggregates in a separate database while decoupling journal reads from writes.
How deep it goes
Defines insert-versus-update behavior and demonstrates transactional SQL, stopping short of database-library details.
Examples
Uses a cargo-per-container projection that creates a count and increments it for later CargoAdded events.
What you can do after
Apply it via ScalikeJDBC to create or update aggregate rows inside a projection transaction.

Read how Akka in Action, Second Edition explains upsert →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.