pub struct IngestionOptionsBuilder { /* private fields */ }Expand description
Builder for IngestionOptions.
Prefer this over constructing IngestionOptions directly when you want to:
- avoid long struct literals in user code
- keep configuration engine-agnostic (no Polars/DataFusion types leak into signatures)
- lean on sensible defaults and override only what you need
Implementations§
Source§impl IngestionOptionsBuilder
impl IngestionOptionsBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a builder with IngestionOptions::default values.
Sourcepub fn format(self, format: IngestionFormat) -> Self
pub fn format(self, format: IngestionFormat) -> Self
Force a specific ingestion format (otherwise inferred from path extension).
Sourcepub fn excel_sheet_selection(self, sel: ExcelSheetSelection) -> Self
pub fn excel_sheet_selection(self, sel: ExcelSheetSelection) -> Self
Configure Excel sheet selection.
Sourcepub fn observer(self, observer: Arc<dyn IngestionObserver>) -> Self
pub fn observer(self, observer: Arc<dyn IngestionObserver>) -> Self
Configure an observer for success/failure/alerts.
Sourcepub fn alert_at_or_above(self, sev: IngestionSeverity) -> Self
pub fn alert_at_or_above(self, sev: IngestionSeverity) -> Self
Configure the severity threshold at which on_alert is invoked.
Sourcepub fn build(self) -> IngestionOptions
pub fn build(self) -> IngestionOptions
Build the configured IngestionOptions.
Sourcepub fn ingest_from_path(
self,
path: impl AsRef<Path>,
schema: &Schema,
) -> IngestionResult<DataSet>
pub fn ingest_from_path( self, path: impl AsRef<Path>, schema: &Schema, ) -> IngestionResult<DataSet>
Convenience: ingest using the configured options.
Trait Implementations§
Source§impl Clone for IngestionOptionsBuilder
impl Clone for IngestionOptionsBuilder
Source§fn clone(&self) -> IngestionOptionsBuilder
fn clone(&self) -> IngestionOptionsBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IngestionOptionsBuilder
impl Debug for IngestionOptionsBuilder
Auto Trait Implementations§
impl Freeze for IngestionOptionsBuilder
impl !RefUnwindSafe for IngestionOptionsBuilder
impl Send for IngestionOptionsBuilder
impl Sync for IngestionOptionsBuilder
impl Unpin for IngestionOptionsBuilder
impl !UnwindSafe for IngestionOptionsBuilder
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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> ⓘ
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 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> ⓘ
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