pub struct DeltaTableBuilder { /* private fields */ }
Expand description
builder for configuring a delta table load.
Implementations§
Source§impl DeltaTableBuilder
impl DeltaTableBuilder
Sourcepub fn from_uri(table_uri: impl AsRef<str>) -> Self
pub fn from_uri(table_uri: impl AsRef<str>) -> Self
Creates DeltaTableBuilder
from table uri
Can panic on an invalid URI
let builder = DeltaTableBuilder::from_uri("../test/tests/data/delta-0.8.0");
assert!(true);
Sourcepub fn from_valid_uri(table_uri: impl AsRef<str>) -> DeltaResult<Self>
pub fn from_valid_uri(table_uri: impl AsRef<str>) -> DeltaResult<Self>
Creates DeltaTableBuilder
from verified table uri.
let builder = DeltaTableBuilder::from_valid_uri("memory:///");
assert!(builder.is_ok(), "Builder failed with {builder:?}");
Sourcepub fn without_tombstones(self) -> Self
pub fn without_tombstones(self) -> Self
Sets require_tombstones=false
to the builder
Sourcepub fn without_files(self) -> Self
pub fn without_files(self) -> Self
Sets require_files=false
to the builder
Sourcepub fn with_version(self, version: i64) -> Self
pub fn with_version(self, version: i64) -> Self
Sets version
to the builder
Sourcepub fn with_log_buffer_size(self, log_buffer_size: usize) -> DeltaResult<Self>
pub fn with_log_buffer_size(self, log_buffer_size: usize) -> DeltaResult<Self>
Sets log_buffer_size
to the builder
Sourcepub fn with_datestring(self, date_string: impl AsRef<str>) -> DeltaResult<Self>
pub fn with_datestring(self, date_string: impl AsRef<str>) -> DeltaResult<Self>
specify the timestamp given as ISO-8601/RFC-3339 timestamp
Sourcepub fn with_timestamp(self, timestamp: DateTime<Utc>) -> Self
pub fn with_timestamp(self, timestamp: DateTime<Utc>) -> Self
specify a timestamp
Sourcepub fn with_storage_backend(
self,
storage: Arc<DynObjectStore>,
location: Url,
) -> Self
pub fn with_storage_backend( self, storage: Arc<DynObjectStore>, location: Url, ) -> Self
Set the storage backend.
If a backend is not provided then it is derived from table_uri
.
§Arguments
storage
- A shared reference to anObjectStore
with “/” pointing at delta table root (i.e. where_delta_log
is located).location
- A url corresponding to the storagle location ofstorage
.
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. See documentation of underlying object store implementation for details. Trailing slash will be trimmed in the option’s value to avoid failures. Trimming will only be done if one or more of below conditions are met:
-
key ends with
_URL
(e.g.,ENDPOINT_URL
,S3_URL
,JDBC_URL
, etc.) -
value starts with
http://`` or
https://(e.g.,
http://localhost:8000/`)
Sourcepub fn with_allow_http(self, allow_http: bool) -> Self
pub fn with_allow_http(self, allow_http: bool) -> Self
Allows unsecure connections via http.
This setting is most useful for testing / development when connecting to emulated services.
Sourcepub fn with_io_runtime(self, io_runtime: IORuntime) -> Self
pub fn with_io_runtime(self, io_runtime: IORuntime) -> Self
Provide a custom runtime handle or runtime config
Sourcepub fn storage_options(&self) -> StorageOptions
pub fn storage_options(&self) -> StorageOptions
Storage options for configuring backend object store
Sourcepub fn build_storage(&self) -> DeltaResult<LogStoreRef>
pub fn build_storage(&self) -> DeltaResult<LogStoreRef>
Build a delta storage backend for the given config
Sourcepub fn build(self) -> DeltaResult<DeltaTable>
pub fn build(self) -> DeltaResult<DeltaTable>
Build the DeltaTable
from specified options.
This will not load the log, i.e. the table is not initialized. To get an initialized
table use the load
function
Sourcepub async fn load(self) -> DeltaResult<DeltaTable>
pub async fn load(self) -> DeltaResult<DeltaTable>
Build the DeltaTable
and load its state
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DeltaTableBuilder
impl !RefUnwindSafe for DeltaTableBuilder
impl Send for DeltaTableBuilder
impl Sync for DeltaTableBuilder
impl Unpin for DeltaTableBuilder
impl !UnwindSafe for DeltaTableBuilder
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