deltalake_core::table::config

Struct TableConfig

Source
pub struct TableConfig<'a>(/* private fields */);
Expand description

Well known delta table configuration

Implementations§

Source§

impl TableConfig<'_>

Source

pub fn append_only(&self) -> bool

true for this Delta table to be append-only

Source

pub fn write_stats_as_json(&self) -> bool

true for Delta Lake to write file statistics in checkpoints in JSON format for the stats column.

Source

pub fn write_stats_as_struct(&self) -> bool

true for Delta Lake to write file statistics to checkpoints in struct format

Source

pub fn target_file_size(&self) -> i64

The target file size in bytes or higher units for file tuning

Source

pub fn enable_change_data_feed(&self) -> bool

true to enable change data feed.

Source

pub fn enable_deletion_vectors(&self) -> bool

true to enable deletion vectors and predictive I/O for updates.

Source

pub fn num_indexed_cols(&self) -> i32

The number of columns for Delta Lake to collect statistics about for data skipping.

Source

pub fn enable_expired_log_cleanup(&self) -> bool

whether to cleanup expired logs

Source

pub fn checkpoint_interval(&self) -> i32

Interval (number of commits) after which a new checkpoint should be created

Source

pub fn deleted_file_retention_duration(&self) -> Duration

The shortest duration for Delta Lake to keep logically deleted data files before deleting them physically. This is to prevent failures in stale readers after compactions or partition overwrites.

This value should be large enough to ensure that:

  • It is larger than the longest possible duration of a job if you run VACUUM when there are concurrent readers or writers accessing the Delta table.
  • If you run a streaming query that reads from the table, that query does not stop for longer than this value. Otherwise, the query may not be able to restart, as it must still read old files.
Source

pub fn log_retention_duration(&self) -> Duration

How long the history for a Delta table is kept.

Each time a checkpoint is written, Delta Lake automatically cleans up log entries older than the retention interval. If you set this property to a large enough value, many log entries are retained. This should not impact performance as operations against the log are constant time. Operations on history are parallel but will become more expensive as the log size increases.

Source

pub fn isolation_level(&self) -> IsolationLevel

The degree to which a transaction must be isolated from modifications made by concurrent transactions.

Valid values are Serializable and WriteSerializable.

Source

pub fn checkpoint_policy(&self) -> CheckpointPolicy

Policy applied during chepoint creation

Source

pub fn column_mapping_mode(&self) -> ColumnMappingMode

Return the column mapping mode according to delta.columnMapping.mode

Source

pub fn get_constraints(&self) -> Vec<Constraint>

Return the check constraints on the current table

Source

pub fn stats_columns(&self) -> Option<Vec<&str>>

Column names on which Delta Lake collects statistics to enhance data skipping functionality. This property takes precedence over num_indexed_cols.

Trait Implementations§

Source§

impl<'a> Debug for TableConfig<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for TableConfig<'a>

§

impl<'a> RefUnwindSafe for TableConfig<'a>

§

impl<'a> Send for TableConfig<'a>

§

impl<'a> Sync for TableConfig<'a>

§

impl<'a> Unpin for TableConfig<'a>

§

impl<'a> UnwindSafe for TableConfig<'a>

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> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T