pub struct TableConfig<'a>(/* private fields */);
Expand description
Well known delta table configuration
Implementations§
Source§impl TableConfig<'_>
impl TableConfig<'_>
Sourcepub fn append_only(&self) -> bool
pub fn append_only(&self) -> bool
true for this Delta table to be append-only
Sourcepub fn write_stats_as_json(&self) -> bool
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.
Sourcepub fn write_stats_as_struct(&self) -> bool
pub fn write_stats_as_struct(&self) -> bool
true for Delta Lake to write file statistics to checkpoints in struct format
Sourcepub fn target_file_size(&self) -> i64
pub fn target_file_size(&self) -> i64
The target file size in bytes or higher units for file tuning
Sourcepub fn enable_change_data_feed(&self) -> bool
pub fn enable_change_data_feed(&self) -> bool
true to enable change data feed.
Sourcepub fn enable_deletion_vectors(&self) -> bool
pub fn enable_deletion_vectors(&self) -> bool
true to enable deletion vectors and predictive I/O for updates.
Sourcepub fn num_indexed_cols(&self) -> i32
pub fn num_indexed_cols(&self) -> i32
The number of columns for Delta Lake to collect statistics about for data skipping.
Sourcepub fn enable_expired_log_cleanup(&self) -> bool
pub fn enable_expired_log_cleanup(&self) -> bool
whether to cleanup expired logs
Sourcepub fn checkpoint_interval(&self) -> i32
pub fn checkpoint_interval(&self) -> i32
Interval (number of commits) after which a new checkpoint should be created
Sourcepub fn deleted_file_retention_duration(&self) -> Duration
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.
Sourcepub fn log_retention_duration(&self) -> Duration
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.
Sourcepub fn isolation_level(&self) -> IsolationLevel
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
.
Sourcepub fn checkpoint_policy(&self) -> CheckpointPolicy
pub fn checkpoint_policy(&self) -> CheckpointPolicy
Policy applied during chepoint creation
Sourcepub fn column_mapping_mode(&self) -> ColumnMappingMode
pub fn column_mapping_mode(&self) -> ColumnMappingMode
Return the column mapping mode according to delta.columnMapping.mode
Sourcepub fn get_constraints(&self) -> Vec<Constraint>
pub fn get_constraints(&self) -> Vec<Constraint>
Return the check constraints on the current table
Sourcepub fn stats_columns(&self) -> Option<Vec<&str>>
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§
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> 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