Trait iceberg::writer::IcebergWriter
source · pub trait IcebergWriter<I = RecordBatch, O = Vec<DataFile>>: Send + 'static {
// Required methods
fn write<'life0, 'async_trait>(
&'life0 mut self,
input: I,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<O>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
The iceberg writer used to write data to iceberg table.
Required Methods§
sourcefn write<'life0, 'async_trait>(
&'life0 mut self,
input: I,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn write<'life0, 'async_trait>(
&'life0 mut self,
input: I,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Write data to iceberg table.
sourcefn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<O>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<O>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Close the writer and return the written data files. If close failed, the data written before maybe be lost. User may need to recreate the writer and rewrite the data again.
§NOTE
After close, regardless of success or failure, the writer should never be used again, otherwise the writer will panic.