pub struct CreateBuilder { /* private fields */ }
Expand description
Build an operation to create a new DeltaTable
Implementations§
Source§impl CreateBuilder
impl CreateBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new CreateBuilder
Sourcepub fn with_table_name(self, name: impl Into<String>) -> Self
pub fn with_table_name(self, name: impl Into<String>) -> Self
Specify the table name. Optionally qualified with a database name [database_name.] table_name.
Sourcepub fn with_location(self, location: impl Into<String>) -> Self
pub fn with_location(self, location: impl Into<String>) -> Self
Specify the path to the location where table data is stored, which could be a path on distributed storage.
Sourcepub fn with_save_mode(self, save_mode: SaveMode) -> Self
pub fn with_save_mode(self, save_mode: SaveMode) -> Self
Specify the behavior when a table exists at location
Sourcepub fn with_comment(self, comment: impl Into<String>) -> Self
pub fn with_comment(self, comment: impl Into<String>) -> Self
Comment to describe the table.
Sourcepub fn with_column(
self,
name: impl Into<String>,
data_type: DataType,
nullable: bool,
metadata: Option<HashMap<String, Value>>,
) -> Self
pub fn with_column( self, name: impl Into<String>, data_type: DataType, nullable: bool, metadata: Option<HashMap<String, Value>>, ) -> Self
Specify a column in the table
Sourcepub fn with_columns(
self,
columns: impl IntoIterator<Item = impl Into<StructField>>,
) -> Self
pub fn with_columns( self, columns: impl IntoIterator<Item = impl Into<StructField>>, ) -> Self
Specify columns to append to schema
Sourcepub fn with_partition_columns(
self,
partition_columns: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn with_partition_columns( self, partition_columns: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Specify table partitioning
Sourcepub fn with_storage_options(
self,
storage_options: HashMap<String, String>,
) -> Self
pub fn with_storage_options( self, storage_options: HashMap<String, String>, ) -> Self
Set options used to initialize storage backend
Options may be passed in the HashMap or set as environment variables.
[crate::table::builder::s3_storage_options] describes the available options for the AWS or S3-compliant backend.
If an object store is also passed using with_object_store()
these options will be ignored.
Sourcepub fn with_configuration(
self,
configuration: impl IntoIterator<Item = (impl Into<String>, Option<impl Into<String>>)>,
) -> Self
pub fn with_configuration( self, configuration: impl IntoIterator<Item = (impl Into<String>, Option<impl Into<String>>)>, ) -> Self
Set configuration on created table
Sourcepub fn with_configuration_property(
self,
key: TableProperty,
value: Option<impl Into<String>>,
) -> Self
pub fn with_configuration_property( self, key: TableProperty, value: Option<impl Into<String>>, ) -> Self
Specify a table property in the table configuration
Sourcepub fn with_metadata(
self,
metadata: impl IntoIterator<Item = (String, Value)>,
) -> Self
pub fn with_metadata( self, metadata: impl IntoIterator<Item = (String, Value)>, ) -> Self
Append custom (application-specific) metadata to the commit.
This might include provenance information such as an id of the user that made the commit or the program that created it.
Sourcepub fn with_raise_if_key_not_exists(self, raise_if_key_not_exists: bool) -> Self
pub fn with_raise_if_key_not_exists(self, raise_if_key_not_exists: bool) -> Self
Specify whether to raise an error if the table properties in the configuration are not TablePropertys
Sourcepub fn with_actions(self, actions: impl IntoIterator<Item = Action>) -> Self
pub fn with_actions(self, actions: impl IntoIterator<Item = Action>) -> Self
Specify additional actions to be added to the commit.
This method is mainly meant for internal use. Manually adding inconsistent actions to a create operation may have undesired effects - use with caution.
Sourcepub fn with_log_store(self, log_store: Arc<dyn LogStore>) -> Self
pub fn with_log_store(self, log_store: Arc<dyn LogStore>) -> Self
Provide a LogStore
instance, that points at table location
Trait Implementations§
Source§impl Clone for CreateBuilder
impl Clone for CreateBuilder
Source§fn clone(&self) -> CreateBuilder
fn clone(&self) -> CreateBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CreateBuilder
impl Debug for CreateBuilder
Source§impl Default for CreateBuilder
impl Default for CreateBuilder
Source§impl IntoFuture for CreateBuilder
impl IntoFuture for CreateBuilder
Source§type Output = Result<DeltaTable, DeltaTableError>
type Output = Result<DeltaTable, DeltaTableError>
Source§type IntoFuture = Pin<Box<dyn Future<Output = <CreateBuilder as IntoFuture>::Output> + Send>>
type IntoFuture = Pin<Box<dyn Future<Output = <CreateBuilder as IntoFuture>::Output> + Send>>
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Auto Trait Implementations§
impl Freeze for CreateBuilder
impl !RefUnwindSafe for CreateBuilder
impl Send for CreateBuilder
impl Sync for CreateBuilder
impl Unpin for CreateBuilder
impl !UnwindSafe for CreateBuilder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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