Struct deltalake::data_catalog::UnityCatalogBuilder
source · pub struct UnityCatalogBuilder { /* private fields */ }
Expand description
Builder for crateing a UnityCatalogClient
Implementations§
source§impl UnityCatalogBuilder
impl UnityCatalogBuilder
sourcepub fn new() -> UnityCatalogBuilder
pub fn new() -> UnityCatalogBuilder
Create a new UnityCatalogBuilder
with default values.
sourcepub fn try_with_option(
self,
key: impl AsRef<str>,
value: impl Into<String>
) -> Result<UnityCatalogBuilder, DataCatalogError>
pub fn try_with_option( self, key: impl AsRef<str>, value: impl Into<String> ) -> Result<UnityCatalogBuilder, DataCatalogError>
Set an option on the builder via a key - value pair.
sourcepub fn try_with_options<I>(
self,
options: I
) -> Result<UnityCatalogBuilder, DataCatalogError>
pub fn try_with_options<I>( self, options: I ) -> Result<UnityCatalogBuilder, DataCatalogError>
Hydrate builder from key value pairs
sourcepub fn from_env() -> UnityCatalogBuilder
pub fn from_env() -> UnityCatalogBuilder
Parse configuration from the environment.
Environment keys prefixed with “UNITY_” or “DATABRICKS_” will be considered
sourcepub fn with_workspace_url(self, url: impl Into<String>) -> UnityCatalogBuilder
pub fn with_workspace_url(self, url: impl Into<String>) -> UnityCatalogBuilder
Set the URL of a Databricks workspace.
sourcepub fn with_client_id(self, client_id: impl Into<String>) -> UnityCatalogBuilder
pub fn with_client_id(self, client_id: impl Into<String>) -> UnityCatalogBuilder
Sets the client id for use in client secret or k8s federated credential flow
sourcepub fn with_client_secret(
self,
client_secret: impl Into<String>
) -> UnityCatalogBuilder
pub fn with_client_secret( self, client_secret: impl Into<String> ) -> UnityCatalogBuilder
Sets the client secret for use in client secret flow
Sets the authority id for use service principal credential based authentication
sourcepub fn with_bearer_token(
self,
bearer_token: impl Into<String>
) -> UnityCatalogBuilder
pub fn with_bearer_token( self, bearer_token: impl Into<String> ) -> UnityCatalogBuilder
Set a static bearer token to be used for authorizing requests
sourcepub fn with_access_token(
self,
access_token: impl Into<String>
) -> UnityCatalogBuilder
pub fn with_access_token( self, access_token: impl Into<String> ) -> UnityCatalogBuilder
Set a personal access token (PAT) to be used for authorizing requests
sourcepub fn with_client_options(self, options: ClientOptions) -> UnityCatalogBuilder
pub fn with_client_options(self, options: ClientOptions) -> UnityCatalogBuilder
Sets the client options, overriding any already set
sourcepub fn with_retry_config(self, config: RetryConfig) -> UnityCatalogBuilder
pub fn with_retry_config(self, config: RetryConfig) -> UnityCatalogBuilder
Sets the retry config, overriding any already set
sourcepub fn build(self) -> Result<UnityCatalog, DataCatalogError>
pub fn build(self) -> Result<UnityCatalog, DataCatalogError>
Build an instance of UnityCatalog
Trait Implementations§
source§impl Default for UnityCatalogBuilder
impl Default for UnityCatalogBuilder
source§fn default() -> UnityCatalogBuilder
fn default() -> UnityCatalogBuilder
Auto Trait Implementations§
impl !Freeze for UnityCatalogBuilder
impl RefUnwindSafe for UnityCatalogBuilder
impl Send for UnityCatalogBuilder
impl Sync for UnityCatalogBuilder
impl Unpin for UnityCatalogBuilder
impl UnwindSafe for UnityCatalogBuilder
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