public interface Table
Modifier and Type | Method and Description |
---|---|
Snapshot |
currentSnapshot()
Get the current
snapshot for this table, or null if there are no snapshots. |
EncryptionManager |
encryption()
Returns an
EncryptionManager to encrypt and decrypt data
files. |
ExpireSnapshots |
expireSnapshots()
Create a new
expire API to manage snapshots in this table and commit. |
java.util.List<HistoryEntry> |
history()
Get the snapshot history of this table.
|
FileIO |
io()
Returns a
FileIO to read and write table data and metadata files. |
java.lang.String |
location()
Return the table's base location.
|
LocationProvider |
locationProvider()
Returns a
LocationProvider to provide locations for new data files. |
ManageSnapshots |
manageSnapshots()
Create a new
manage snapshots API to manage snapshots in this table and
commit. |
default java.lang.String |
name()
Return the full name for this table.
|
AppendFiles |
newAppend()
Create a new
append API to add files to this table and commit. |
default BatchScan |
newBatchScan()
Create a new
batch scan for this table. |
DeleteFiles |
newDelete()
Create a new
delete API to replace files in this table and commit. |
default AppendFiles |
newFastAppend()
Create a new
append API to add files to this table and commit. |
default IncrementalAppendScan |
newIncrementalAppendScan()
Create a new
scan for this table. |
default IncrementalChangelogScan |
newIncrementalChangelogScan()
Create a new
IncrementalChangelogScan for this table. |
OverwriteFiles |
newOverwrite()
Create a new
overwrite API to overwrite files by a filter expression. |
ReplacePartitions |
newReplacePartitions()
Not recommended: Create a new
replace partitions API to dynamically
overwrite partitions in the table with new data. |
RewriteFiles |
newRewrite()
Create a new
rewrite API to replace files in this table and commit. |
RowDelta |
newRowDelta()
Create a new
row-level delta API to remove or replace rows in existing data
files. |
TableScan |
newScan()
Create a new
scan for this table. |
Transaction |
newTransaction()
Create a new
transaction API to commit multiple table operations at once. |
java.util.Map<java.lang.String,java.lang.String> |
properties()
Return a map of string properties for this table.
|
void |
refresh()
Refresh the current table metadata.
|
java.util.Map<java.lang.String,SnapshotRef> |
refs()
Returns the current refs for the table
|
ReplaceSortOrder |
replaceSortOrder()
Create a new
ReplaceSortOrder to set the table sort order and commit the change. |
RewriteManifests |
rewriteManifests()
Create a new
rewrite manifests API to replace manifests for this table
and commit. |
Schema |
schema()
Return the
schema for this table. |
java.util.Map<java.lang.Integer,Schema> |
schemas()
Return a map of
schema for this table. |
Snapshot |
snapshot(long snapshotId)
Get the
snapshot of this table with the given id, or null if there is no
matching snapshot. |
default Snapshot |
snapshot(java.lang.String name)
Returns the snapshot referenced by the given name or null if no such reference exists.
|
java.lang.Iterable<Snapshot> |
snapshots()
Get the
snapshots of this table. |
SortOrder |
sortOrder()
Return the
sort order for this table. |
java.util.Map<java.lang.Integer,SortOrder> |
sortOrders()
Return a map of sort order IDs to
sort orders for this table. |
PartitionSpec |
spec()
Return the
partition spec for this table. |
java.util.Map<java.lang.Integer,PartitionSpec> |
specs()
Return a map of
partition specs for this table. |
java.util.List<StatisticsFile> |
statisticsFiles()
Returns the current statistics files for the table
|
UpdateLocation |
updateLocation()
Create a new
UpdateLocation to update table location and commit the changes. |
UpdateProperties |
updateProperties()
Create a new
UpdateProperties to update table properties and commit the changes. |
UpdateSchema |
updateSchema()
Create a new
UpdateSchema to alter the columns of this table and commit the change. |
UpdatePartitionSpec |
updateSpec()
Create a new
UpdatePartitionSpec to alter the partition spec of this table and commit
the change. |
default UpdateStatistics |
updateStatistics()
Create a new
update table statistics API to add or remove statistics
files in this table. |
default java.lang.String name()
void refresh()
TableScan newScan()
scan
for this table.
Once a table scan is created, it can be refined to project columns and filter data.
default BatchScan newBatchScan()
batch scan
for this table.
Once a batch scan is created, it can be refined to project columns and filter data.
default IncrementalAppendScan newIncrementalAppendScan()
scan
for this table.
Once a scan is created, it can be refined to project columns and filter data.
default IncrementalChangelogScan newIncrementalChangelogScan()
IncrementalChangelogScan
for this table.
Once a scan is created, it can be refined to project columns and filter data.
java.util.Map<java.lang.Integer,Schema> schemas()
schema
for this table.PartitionSpec spec()
partition spec
for this table.java.util.Map<java.lang.Integer,PartitionSpec> specs()
partition specs
for this table.SortOrder sortOrder()
sort order
for this table.java.util.Map<java.lang.Integer,SortOrder> sortOrders()
sort orders
for this table.java.util.Map<java.lang.String,java.lang.String> properties()
java.lang.String location()
Snapshot currentSnapshot()
snapshot
for this table, or null if there are no snapshots.Snapshot snapshot(long snapshotId)
snapshot
of this table with the given id, or null if there is no
matching snapshot.Snapshot
with the given id.java.lang.Iterable<Snapshot> snapshots()
snapshots
of this table.java.util.List<HistoryEntry> history()
history entries
UpdateSchema updateSchema()
UpdateSchema
to alter the columns of this table and commit the change.UpdateSchema
UpdatePartitionSpec updateSpec()
UpdatePartitionSpec
to alter the partition spec of this table and commit
the change.UpdatePartitionSpec
UpdateProperties updateProperties()
UpdateProperties
to update table properties and commit the changes.UpdateProperties
ReplaceSortOrder replaceSortOrder()
ReplaceSortOrder
to set the table sort order and commit the change.ReplaceSortOrder
UpdateLocation updateLocation()
UpdateLocation
to update table location and commit the changes.UpdateLocation
AppendFiles newAppend()
append API
to add files to this table and commit.AppendFiles
default AppendFiles newFastAppend()
append API
to add files to this table and commit.
Using this method signals to the underlying implementation that the append should not perform extra work in order to commit quickly. Fast appends are not recommended for normal writes because the fast commit may cause split planning to slow down over time.
Implementations may not support fast appends, in which case this will return the same
appender as newAppend()
.
AppendFiles
RewriteFiles newRewrite()
rewrite API
to replace files in this table and commit.RewriteFiles
RewriteManifests rewriteManifests()
rewrite manifests API
to replace manifests for this table
and commit.RewriteManifests
OverwriteFiles newOverwrite()
overwrite API
to overwrite files by a filter expression.OverwriteFiles
RowDelta newRowDelta()
row-level delta API
to remove or replace rows in existing data
files.RowDelta
ReplacePartitions newReplacePartitions()
replace partitions API
to dynamically
overwrite partitions in the table with new data.
This is provided to implement SQL compatible with Hive table operations but is not
recommended. Instead, use the overwrite API
to explicitly overwrite
data.
ReplacePartitions
DeleteFiles newDelete()
delete API
to replace files in this table and commit.DeleteFiles
default UpdateStatistics updateStatistics()
update table statistics API
to add or remove statistics
files in this table.UpdateStatistics
ExpireSnapshots expireSnapshots()
expire API
to manage snapshots in this table and commit.ExpireSnapshots
ManageSnapshots manageSnapshots()
manage snapshots API
to manage snapshots in this table and
commit.ManageSnapshots
Transaction newTransaction()
transaction API
to commit multiple table operations at once.Transaction
EncryptionManager encryption()
EncryptionManager
to encrypt and decrypt data
files.LocationProvider locationProvider()
LocationProvider
to provide locations for new data files.java.util.List<StatisticsFile> statisticsFiles()
java.util.Map<java.lang.String,SnapshotRef> refs()
default Snapshot snapshot(java.lang.String name)