deltalake_core::operations

Module update

Source
Expand description

Update records from a Delta Table for records statisfy a predicate

When a predicate is not provided then all records are updated from the Delta Table. Otherwise a scan of the Delta table is performed to mark any files that contain records that satisfy the predicate. Once they are determined then column values are updated with new values provided by the user

Predicates MUST be deterministic otherwise undefined behaviour may occur during the scanning and rewriting phase.

§Example

let table = open_table("../path/to/table")?;
let (table, metrics) = UpdateBuilder::new(table.object_store(), table.state)
    .with_predicate(col("col1").eq(lit(1)))
    .with_update("value", col("value") + lit(20))
    .await?;

Structs§

  • Updates records in the Delta Table. See this module’s documentation for more information
  • Metrics collected during the Update operation