pub struct UnityCatalog { /* private fields */ }
Expand description
Databricks Unity Catalog
Implementations§
Source§impl UnityCatalog
impl UnityCatalog
Sourcepub async fn list_catalogs(&self) -> DataCatalogResult<ListCatalogsResponse>
pub async fn list_catalogs(&self) -> DataCatalogResult<ListCatalogsResponse>
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.
Sourcepub async fn list_schemas(
&self,
catalog_name: impl AsRef<str>,
) -> DataCatalogResult<ListSchemasResponse>
pub async fn list_schemas( &self, catalog_name: impl AsRef<str>, ) -> DataCatalogResult<ListSchemasResponse>
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.
Sourcepub async fn get_schema(
&self,
catalog_name: impl AsRef<str>,
schema_name: impl AsRef<str>,
) -> DataCatalogResult<GetSchemaResponse>
pub async fn get_schema( &self, catalog_name: impl AsRef<str>, schema_name: impl AsRef<str>, ) -> DataCatalogResult<GetSchemaResponse>
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.
Sourcepub async fn list_table_summaries(
&self,
catalog_name: impl AsRef<str>,
schema_name_pattern: impl AsRef<str>,
) -> DataCatalogResult<ListTableSummariesResponse>
pub async fn list_table_summaries( &self, catalog_name: impl AsRef<str>, schema_name_pattern: impl AsRef<str>, ) -> DataCatalogResult<ListTableSummariesResponse>
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.
Sourcepub async fn get_table(
&self,
catalog_id: impl AsRef<str>,
database_name: impl AsRef<str>,
table_name: impl AsRef<str>,
) -> DataCatalogResult<GetTableResponse>
pub async fn get_table( &self, catalog_id: impl AsRef<str>, database_name: impl AsRef<str>, table_name: impl AsRef<str>, ) -> DataCatalogResult<GetTableResponse>
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
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
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
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
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get the table storage location from the UnityCatalog
Auto Trait Implementations§
impl !Freeze for UnityCatalog
impl !RefUnwindSafe for UnityCatalog
impl Send for UnityCatalog
impl Sync for UnityCatalog
impl Unpin for UnityCatalog
impl !UnwindSafe for UnityCatalog
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
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>
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>
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