Expand description
Portable Unity Catalog Delta v1 REST API.
This crate owns the Delta API semantics — the hand-written wire models, the
catalog-managed table contract, the commit coordinator, and the updateTable
action dispatcher — behind a narrow backend port. Any
server can serve the identical /delta/v1 surface by implementing
DeltaBackend over its own storage, credential vending, and authorization;
all the Delta business logic is shared here, so the behavior is identical by
construction.
It depends only on axum, async-trait, serde, uuid, and thiserror — it
does not depend on any server crate, so a downstream server (mangrove,
lakekeeper, …) takes this single dependency and nothing else.
§Examples
Implement DeltaBackend over your own storage, then hand it to
get_router to serve the entire /delta/v1 surface. Here the in-memory
backend from the testing feature stands in for a real one:
use unitycatalog_delta_api::get_router;
use unitycatalog_delta_api::testing::InMemoryDeltaBackend;
// `InMemoryDeltaBackend` implements `DeltaBackend<()>`, so the context type
// is `()`. A real server uses its own request-context type here.
let router: axum::Router = get_router::<InMemoryDeltaBackend, ()>(InMemoryDeltaBackend::new());§Layout
models— hand-written serde wire DTOs (kebab-case JSON).error— the decoupled error contract (DeltaApiError+DeltaBackendError).column— the portable UC column model used by the contract.config—getConfigsupport: capability-driven endpoint list + protocol version negotiation.contract— the managed-table contract + Delta↔UC column mapping.coordinator— the commit coordinator (arbitration + backfill).authz— theDeltaActionvocabulary the handler authorizes with.backend— theDeltaBackendport trait + its coordinate/request types.handler— theDeltaApiHandlertrait + the generic blanket impl.router— the axum router mounting all 12 operations.
Re-exports§
pub use authz::DeltaAction;pub use backend::DeltaBackend;pub use backend::DeltaCapabilities;pub use error::DeltaApiError;pub use error::DeltaApiResult;pub use error::DeltaBackendError;pub use handler::DeltaApiHandler;pub use router::get_router;
Modules§
- authz
- The authorization vocabulary the handler speaks to the backend.
- backend
- The
DeltaBackendport: the narrow backend interface the Delta business logic calls. - column
- Portable UC column model used by the managed-table contract.
- config
getConfigsupport: the capability-driven endpoint list and protocol-version negotiation.- contract
- The UC catalog-managed Delta table contract, the stored-property projection, and the Delta-API ↔ UC column conversion.
- coordinator
- Delta catalog-managed commit coordinator.
- error
- The
/delta/v1error contract, decoupled from any server’s internal error. - handler
- The
DeltaApiHandlertrait and its generic implementation over aDeltaBackend. - models
- Hand-written serde models for the UC Delta REST API (
/delta/v1/...). - router
- Axum router for the UC Delta REST API (
/delta/v1/...). - testing
testing - An in-memory
DeltaBackendfor exercising the Delta business logic without a real backend.