Struct deltalake::data_catalog::UnityCatalog

source ·
pub struct UnityCatalog { /* private fields */ }
Expand description

Databricks Unity Catalog

Implementations§

source§

impl UnityCatalog

source

pub async fn list_catalogs( &self ) -> Result<ListCatalogsResponse, DataCatalogError>

Gets an array of catalogs in the metastore. If the caller is the metastore admin, all catalogs will be retrieved. Otherwise, only catalogs owned by the caller (or for which the caller has the USE_CATALOG privilege) will be retrieved. There is no guarantee of a specific ordering of the elements in the array.

source

pub async fn list_schemas( &self, catalog_name: impl AsRef<str> ) -> Result<ListSchemasResponse, DataCatalogError>

List all schemas for a catalog in the metastore.

If the caller is the metastore admin or the owner of the parent catalog, all schemas for the catalog will be retrieved. Otherwise, only schemas owned by the caller (or for which the caller has the USE_SCHEMA privilege) will be retrieved. There is no guarantee of a specific ordering of the elements in the array.

§Parameters
  • catalog_name: Parent catalog for schemas of interest.
source

pub async fn get_schema( &self, catalog_name: impl AsRef<str>, schema_name: impl AsRef<str> ) -> Result<GetSchemaResponse, DataCatalogError>

Gets the specified schema within the metastore.#

The caller must be a metastore admin, the owner of the schema, or a user that has the USE_SCHEMA privilege on the schema.

source

pub async fn list_table_summaries( &self, catalog_name: impl AsRef<str>, schema_name_pattern: impl AsRef<str> ) -> Result<ListTableSummariesResponse, DataCatalogError>

Gets an array of summaries for tables for a schema and catalog within the metastore.

The table summaries returned are either:

  • summaries for all tables (within the current metastore and parent catalog and schema), when the user is a metastore admin, or:
  • summaries for all tables and schemas (within the current metastore and parent catalog) for which the user has ownership or the SELECT privilege on the table and ownership or USE_SCHEMA privilege on the schema, provided that the user also has ownership or the USE_CATALOG privilege on the parent catalog.

There is no guarantee of a specific ordering of the elements in the array.

source

pub async fn get_table( &self, catalog_id: impl AsRef<str>, database_name: impl AsRef<str>, table_name: impl AsRef<str> ) -> Result<GetTableResponse, DataCatalogError>

Gets a table from the metastore for a specific catalog and schema.

The caller must be a metastore admin, be the owner of the table and have the USE_CATALOG privilege on the parent catalog and the USE_SCHEMA privilege on the parent schema, or be the owner of the table and have the SELECT privilege on it as well.

§Parameters

Trait Implementations§

source§

impl DataCatalog for UnityCatalog

source§

fn get_table_storage_location<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, catalog_id: Option<String>, database_name: &'life1 str, table_name: &'life2 str ) -> Pin<Box<dyn Future<Output = Result<String, DataCatalogError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, UnityCatalog: 'async_trait,

Get the table storage location from the UnityCatalog

source§

impl Debug for UnityCatalog

source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> Ungil for T
where T: Send,