Interface UCDeltaClient
- All Superinterfaces:
AutoCloseable,UCClient
- All Known Implementing Classes:
UCDeltaTokenBasedRestClient
Extends
UCClient with Delta table lifecycle operations backed by the UC Delta API
(load, stage, and create tables).-
Nested Class Summary
Nested classes/interfaces inherited from interface io.delta.storage.commit.uccommitcoordinator.UCClient
UCClient.ColumnDef -
Method Summary
Modifier and TypeMethodDescriptioncreateStagingTable(TableIdentifier tableIdentifier) Reserves a staging slot for a new Delta table.createTable(URI tableUri, TableIdentifier tableIdentifier, UCDeltaModels.TableType tableType, AbstractMetadata metadata, AbstractProtocol protocol, List<AbstractDomainMetadata> domainMetadata, long lastCommitTimestampMs, Optional<UniformMetadata> uniformMetadata) Finalizes a previously staged Delta table, making it visible in the catalog.loadTable(TableIdentifier tableIdentifier) Loads a table's metadata from Unity Catalog.voidreportMetrics(String tableId, TableIdentifier tableIdentifier, UCDeltaModels.CommitReport report) Reports post-commit telemetry for a table (file/row counts, byte counts, file-size histogram) to the catalog.Methods inherited from interface io.delta.storage.commit.uccommitcoordinator.UCClient
close, commit, finalizeCreate, getCommits, getMetastoreId
-
Method Details
-
loadTable
Loads a table's metadata from Unity Catalog.- Parameters:
tableIdentifier- catalog + schema namespace and table name- Returns:
- the table's
UCDeltaModels.TableInfo, carrying the catalog-supplied storage location and metadata - Throws:
IOException- on network or API errors
-
createStagingTable
UCDeltaModels.StagingTableInfo createStagingTable(TableIdentifier tableIdentifier) throws IOException Reserves a staging slot for a new Delta table. The returned response contains the table ID, storage location, and protocol/property requirements that the caller must honor when finalizing the table withcreateTable(java.net.URI, io.delta.storage.commit.TableIdentifier, io.delta.storage.commit.uccommitcoordinator.UCDeltaModels.TableType, io.delta.storage.commit.actions.AbstractMetadata, io.delta.storage.commit.actions.AbstractProtocol, java.util.List<io.delta.storage.commit.actions.AbstractDomainMetadata>, long, java.util.Optional<io.delta.storage.commit.uniform.UniformMetadata>).- Parameters:
tableIdentifier- catalog + schema namespace and table name- Returns:
- a
UCDeltaModels.StagingTableInfowith the reserved table details - Throws:
IOException- on network or API errors
-
createTable
UCDeltaModels.TableInfo createTable(URI tableUri, TableIdentifier tableIdentifier, UCDeltaModels.TableType tableType, AbstractMetadata metadata, AbstractProtocol protocol, List<AbstractDomainMetadata> domainMetadata, long lastCommitTimestampMs, Optional<UniformMetadata> uniformMetadata) throws IOException Finalizes a previously staged Delta table, making it visible in the catalog. Mirrors the shape ofUCClient.commit(java.lang.String, java.net.URI, io.delta.storage.commit.TableIdentifier, java.util.Optional<io.delta.storage.commit.Commit>, java.util.Optional<java.lang.Long>, java.util.Optional<io.delta.storage.commit.actions.AbstractMetadata>, java.util.Optional<io.delta.storage.commit.actions.AbstractMetadata>, java.util.Optional<io.delta.storage.commit.actions.AbstractProtocol>, java.util.Optional<io.delta.storage.commit.actions.AbstractProtocol>, java.util.List<io.delta.storage.commit.actions.AbstractDomainMetadata>, java.util.Optional<io.delta.storage.commit.uniform.UniformMetadata>): the catalog-level identity is conveyed bytableId/tableUri/tableIdentifier; the Delta-log shape is conveyed by anAbstractMetadata(description, schemaString, partitionColumns, configuration) and anAbstractProtocol(min reader/writer versions, reader/writer features).- Parameters:
tableUri- the storage location of the staged tabletableIdentifier- catalog + schema namespace and table nametableType- MANAGED or EXTERNALmetadata- the Delta metadata to register; onlydescription,schemaString,partitionColumns, andconfigurationare consumedprotocol- the Delta protocol the table will be created withdomainMetadata- the snapshot's domain-metadata entries (e.g. clustering, row-tracking); pass an empty list when none are setlastCommitTimestampMs- Delta-log timestamp of the initial commit; UC stores this on the catalog entryuniformMetadata- UniForm Iceberg metadata generated for the initial snapshot; empty when the table was not created with UniForm enabled- Returns:
- the newly created table's
UCDeltaModels.TableInfo - Throws:
IOException- on network or API errors
-
reportMetrics
void reportMetrics(String tableId, TableIdentifier tableIdentifier, UCDeltaModels.CommitReport report) throws IOException Reports post-commit telemetry for a table (file/row counts, byte counts, file-size histogram) to the catalog.- Parameters:
tableId- catalog-side table id (UC's `table_uuid`)tableIdentifier- catalog + schema namespace and table namereport- per-commit metrics payload- Throws:
IOException- on network or API errors
-