deltalake_core::table::builder

Struct DeltaTableBuilder

Source
pub struct DeltaTableBuilder { /* private fields */ }
Expand description

builder for configuring a delta table load.

Implementations§

Source§

impl DeltaTableBuilder

Source

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);
Source

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:?}");
Source

pub fn without_tombstones(self) -> Self

Sets require_tombstones=false to the builder

Source

pub fn without_files(self) -> Self

Sets require_files=false to the builder

Source

pub fn with_version(self, version: i64) -> Self

Sets version to the builder

Source

pub fn with_log_buffer_size(self, log_buffer_size: usize) -> DeltaResult<Self>

Sets log_buffer_size to the builder

Source

pub fn with_datestring(self, date_string: impl AsRef<str>) -> DeltaResult<Self>

specify the timestamp given as ISO-8601/RFC-3339 timestamp

Source

pub fn with_timestamp(self, timestamp: DateTime<Utc>) -> Self

specify a timestamp

Source

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 an ObjectStore with “/” pointing at delta table root (i.e. where _delta_log is located).
  • location - A url corresponding to the storagle location of storage.
Source

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:

Source

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.

Source

pub fn with_io_runtime(self, io_runtime: IORuntime) -> Self

Provide a custom runtime handle or runtime config

Source

pub fn storage_options(&self) -> StorageOptions

Storage options for configuring backend object store

Source

pub fn build_storage(&self) -> DeltaResult<LogStoreRef>

Build a delta storage backend for the given config

Source

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

Source

pub async fn load(self) -> DeltaResult<DeltaTable>

Build the DeltaTable and load its state

Trait Implementations§

Source§

impl Debug for DeltaTableBuilder

Source§

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

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<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

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>,

Source§

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> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T