Interface Snapshot

All Known Implementing Classes:
SnapshotImpl

@Evolving public interface Snapshot
Represents the snapshot of a Delta table.
Since:
3.0.0
  • Method Details

    • getVersion

      long getVersion()
      Get the version of this snapshot in the table.
      Returns:
      version of this snapshot in the Delta table
    • getPartitionColumnNames

      List<String> getPartitionColumnNames()
      Get the names of the partition columns in the Delta table at this snapshot.

      The partition column names are returned in the order they are defined in the Delta table schema. If the table does not define any partition columns, this method returns an empty list.

      Returns:
      a list of partition column names, or an empty list if the table is not partitioned.
    • getTimestamp

      long getTimestamp(Engine engine)
      Get the timestamp (in milliseconds since the Unix epoch) of the latest commit in this snapshot.
      Parameters:
      engine - the engine to use for IO operations
      Returns:
      the timestamp of the latest commit
    • getSchema

      StructType getSchema()
      Get the schema of the table at this snapshot.
      Returns:
      Schema of the Delta table at this snapshot.
    • getDomainMetadata

      Optional<String> getDomainMetadata(String domain)
      Returns the configuration for the provided domain if it exists in the snapshot. Returns empty if the domain is not present in the snapshot.
      Returns:
      the configuration for the provided domain if it exists
    • getScanBuilder

      ScanBuilder getScanBuilder()
      Create a scan builder to construct a Scan to read data from this snapshot.
      Returns:
      an instance of ScanBuilder