deltalake_core::writer

Trait DeltaWriter

Source
pub trait DeltaWriter<T> {
    // Required methods
    fn write<'life0, 'async_trait>(
        &'life0 mut self,
        values: T,
    ) -> Pin<Box<dyn Future<Output = Result<(), DeltaTableError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn write_with_mode<'life0, 'async_trait>(
        &'life0 mut self,
        values: T,
        mode: WriteMode,
    ) -> Pin<Box<dyn Future<Output = Result<(), DeltaTableError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn flush<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Add>, DeltaTableError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn flush_and_commit<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        table: &'life1 mut DeltaTable,
    ) -> Pin<Box<dyn Future<Output = Result<i64, DeltaTableError>> + Send + 'async_trait>>
       where Self: Send + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
Expand description

Trait for writing data to Delta tables

Required Methods§

Source

fn write<'life0, 'async_trait>( &'life0 mut self, values: T, ) -> Pin<Box<dyn Future<Output = Result<(), DeltaTableError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Write a chunk of values into the internal write buffers with the default write mode

Source

fn write_with_mode<'life0, 'async_trait>( &'life0 mut self, values: T, mode: WriteMode, ) -> Pin<Box<dyn Future<Output = Result<(), DeltaTableError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Wreite a chunk of values into the internal write buffers with the specified WriteMode

Source

fn flush<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Add>, DeltaTableError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Flush the internal write buffers to files in the delta table folder structure. The corresponding delta Add actions are returned and should be committed via a transaction.

Provided Methods§

Source

fn flush_and_commit<'life0, 'life1, 'async_trait>( &'life0 mut self, table: &'life1 mut DeltaTable, ) -> Pin<Box<dyn Future<Output = Result<i64, DeltaTableError>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Flush the internal write buffers to files in the delta table folder structure. and commit the changes to the Delta log, creating a new table version.

Implementors§