Skip to main content

Crate unitycatalog_client

Crate unitycatalog_client 

Source
Expand description

Async Rust client for the Unity Catalog REST API.

UnityCatalogClient is the entry point: construct it from a base URL and an auth token, then reach a resource through the accessor for that resource — catalog(name), list_catalogs(), tables_client(), and so on. Each accessor returns a scoped sub-client or request builder; list builders implement IntoFuture (so you can .await them directly) and into_stream() for auto-paginated iteration.

Two surfaces are hand-written rather than generated from the API spec and have their own accessors: UnityCatalogClient::delta_v1 for the /delta/v1 Delta REST API and UnityCatalogClient::temporary_credentials for credential vending with name → UUID resolution.

use unitycatalog_client::UnityCatalogClient;
use url::Url;

let client = UnityCatalogClient::new_with_token(
    Url::parse("https://example.com/api/2.1/unity-catalog/").unwrap(),
    "dapi...",
);

// Fetch one catalog by name.
let catalog = client.catalog("main").get().await?;

Fallible calls return Result, whose error type Error distinguishes UC API errors (UcApiError) from Delta error envelopes and offers predicates like Error::is_not_found for control flow.

Re-exports§

pub use codegen::UnityCatalogClient;
pub use codegen::agent_skills::AgentSkillClient;
pub use codegen::agents::AgentClient;
pub use codegen::catalogs::CatalogClient;
pub use codegen::credentials::CredentialClient;
pub use codegen::external_locations::ExternalLocationClient;
pub use codegen::functions::FunctionClient;
pub use codegen::policies::PolicyClient;
pub use codegen::providers::ProviderClient;
pub use codegen::recipients::RecipientClient;
pub use codegen::registered_models::RegisteredModelClient;
pub use codegen::schemas::SchemaClient;
pub use codegen::shares::ShareClient;
pub use codegen::staging_tables::StagingTableClient;
pub use codegen::tables::TableClient;
pub use codegen::tag_policies::TagPolicyClient;
pub use codegen::volumes::VolumeClient;
pub use error::*;

Modules§

codegen
error

Structs§

DeltaV1Client
Client for the /delta/v1/ Delta REST API.
TemporaryCredentialClient
Client for vending temporary storage credentials for tables, volumes, and paths.

Enums§

ModelVersionOperation
The kind of access requested for a model version.
PathOperation
The kind of access requested for a storage path.
TableOperation
The kind of access requested for a table.
TableReference
A reference to a table in unity catalog.
VolumeOperation
The kind of access requested for a volume.
VolumeReference
A reference to a volume in unity catalog.