Package io.delta.kernel
Interface Snapshot
- All Known Implementing Classes:
SnapshotImpl
Represents the snapshot of a Delta table.
- Since:
- 3.0.0
-
Method Summary
Modifier and TypeMethodDescriptiongetDomainMetadata
(String domain) Returns the configuration for the provideddomain
if it exists in the snapshot.Get the names of the partition columns in the Delta table at this snapshot.Create a scan builder to construct aScan
to read data from this snapshot.Get the schema of the table at this snapshot.long
getTimestamp
(Engine engine) Get the timestamp (in milliseconds since the Unix epoch) of the latest commit in this snapshot.long
Get the version of this snapshot in the table.
-
Method Details
-
getVersion
long getVersion()Get the version of this snapshot in the table.- Returns:
- version of this snapshot in the Delta table
-
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
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
Returns the configuration for the provideddomain
if it exists in the snapshot. Returns empty if thedomain
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 aScan
to read data from this snapshot.- Returns:
- an instance of
ScanBuilder
-