Struct deltalake::data_catalog::unity::datafusion::UnityCatalogProvider
source · pub struct UnityCatalogProvider {
pub schemas: DashMap<String, Arc<dyn SchemaProvider>>,
}
Expand description
A datafusion CatalogProvider
backed by Databricks UnityCatalog
Fields§
§schemas: DashMap<String, Arc<dyn SchemaProvider>>
Parent catalog for schemas of interest.
Implementations§
source§impl UnityCatalogProvider
impl UnityCatalogProvider
sourcepub async fn try_new(
client: Arc<UnityCatalog>,
catalog_name: impl Into<String>,
storage_options: impl IntoIterator<Item = (impl Into<String>, impl Into<String>)> + Clone
) -> Result<UnityCatalogProvider, DataCatalogError>
pub async fn try_new( client: Arc<UnityCatalog>, catalog_name: impl Into<String>, storage_options: impl IntoIterator<Item = (impl Into<String>, impl Into<String>)> + Clone ) -> Result<UnityCatalogProvider, DataCatalogError>
Create a new instance of UnityCatalogProvider
Trait Implementations§
source§impl CatalogProvider for UnityCatalogProvider
impl CatalogProvider for UnityCatalogProvider
source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Returns the catalog provider as
Any
so that it can be downcast to a specific implementation.source§fn schema_names(&self) -> Vec<String>
fn schema_names(&self) -> Vec<String>
Retrieves the list of available schema names in this catalog.
source§fn schema(&self, name: &str) -> Option<Arc<dyn SchemaProvider>>
fn schema(&self, name: &str) -> Option<Arc<dyn SchemaProvider>>
Retrieves a specific schema from the catalog by name, provided it exists.
source§fn register_schema(
&self,
name: &str,
schema: Arc<dyn SchemaProvider>
) -> Result<Option<Arc<dyn SchemaProvider>>, DataFusionError>
fn register_schema( &self, name: &str, schema: Arc<dyn SchemaProvider> ) -> Result<Option<Arc<dyn SchemaProvider>>, DataFusionError>
Adds a new schema to this catalog. Read more
source§fn deregister_schema(
&self,
_name: &str,
_cascade: bool
) -> Result<Option<Arc<dyn SchemaProvider>>, DataFusionError>
fn deregister_schema( &self, _name: &str, _cascade: bool ) -> Result<Option<Arc<dyn SchemaProvider>>, DataFusionError>
Removes a schema from this catalog. Implementations of this method should return
errors if the schema exists but cannot be dropped. For example, in DataFusion’s
default in-memory catalog,
MemoryCatalogProvider
, a non-empty schema
will only be successfully dropped when cascade
is true.
This is equivalent to how DROP SCHEMA works in PostgreSQL. Read moreAuto Trait Implementations§
impl Freeze for UnityCatalogProvider
impl !RefUnwindSafe for UnityCatalogProvider
impl Send for UnityCatalogProvider
impl Sync for UnityCatalogProvider
impl Unpin for UnityCatalogProvider
impl !UnwindSafe for UnityCatalogProvider
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.