Module snapshot

Source
Expand description

Snapshot management and versioning for Iceberg tables.

This module provides the core types and implementations for managing table snapshots, which represent the state of a table at specific points in time. Key components include:

  • Snapshot - Represents a point-in-time state of the table
  • Operation - Types of operations that can create new snapshots
  • Summary - Metadata about changes made in a snapshot
  • SnapshotReference - Named references to snapshots (branches and tags)
  • SnapshotRetention - Policies for snapshot retention and cleanup

Snapshots are fundamental to Iceberg’s time travel and version control capabilities, allowing tables to maintain their history and enabling features like rollbacks and incremental processing.

Structs§

Snapshot
A snapshot represents the state of a table at some time and is used to access the complete set of data files in the table.
SnapshotBuilder
Builder for Snapshot.
SnapshotReference
Iceberg tables keep track of branches and tags using snapshot references.
Summary
Summarises the changes in the snapshot.

Enums§

Operation
The operation field is used by some operations, like snapshot expiration, to skip processing certain snapshots.
SnapshotBuilderError
Error type for SnapshotBuilder
SnapshotRetention
The snapshot expiration procedure removes snapshots from table metadata and applies the table’s retention policy.

Functions§

generate_snapshot_id
Generates a random snapshot ID using a cryptographically secure random number generator.