Skip to content

Delta graph sources can't be pinned for a run or materialized: the snapshot-pin and materialize APIs are Iceberg-only #2161

Closed

Description

@bplatz

A Delta graph source can be queried at a version: --at snapshot:<version> and @snapshot: / @iso: resolve through VersionSelector (fluree-db-api/src/graph_source/delta.rs:615). Nothing that pins a source for a run, or materializes it, accepts Delta.

require_iceberg_backed (fluree-db-api/src/graph_source/r2rml.rs:102) refuses Delta with "materialization is not yet available for Delta graph sources" in three places:

  • prepare_iceberg_scan (:1555), which serves:
    • current_snapshot_id (:1797), the call that pins a table's "to" point;
    • scan_for_materialize_stream (:1997);
    • scan_table_incremental.
  • materialize_options (:1856), so materialize_r2rml_graph_source and the tracking worker refuse Delta.
  • load_table_context (:3425).

fluree materialize (fluree-db-api/src/materialize.rs) is R2RML-over-Iceberg only as well.

So a consumer can pin each table at the start of a run and read each table at its pin for Iceberg, but not for Delta.

Line numbers are on main at aa9aa7acd. next is the same.

What's needed

  1. A pin. Return the table's current Delta version through the entry point Iceberg uses for its snapshot id. DeltaTable::snapshot(VersionSelector::Latest) already resolves it.
  2. A full read at a pinned version, streamed and returned as a MaterializeScan. fluree-db-delta already streams a version's logical rows as ColumnBatches, with deletion vectors and column mapping applied by Kernel.
  3. Materialization. materialize_options and the tracking worker should accept Delta, doing a full read per poll until incremental windows exist (Delta: incremental materialization from the change data feed #2162).

Open questions

  • Where to dispatch. On source_type inside FlureeR2rmlProvider, or behind a source-neutral trait. MaterializeSource in r2rml_materialize.rs is already the seam the engine reads through.
  • Watermark meaning. Iceberg stores a snapshot id and a commit sequence. Delta has one monotonic version. The stored type can stay i64, but expiry differs: Delta loses old versions to log retention and VACUUM, not snapshot expiry. ScanChoice::FullUndeterminable needs a Delta equivalent.
  • Bounding an unpinned full read. The Iceberg row budget cuts a full read at a commit boundary using each file's data_sequence_number. A Delta snapshot's file listing doesn't carry the version that added each file, so that cut has no direct equivalent without replaying the log. A pinned read needs no bound.

Activity

  1. added
    enhancement
    P2
    area:iceberg
    on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2area:icebergenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions