pub struct FileSource { /* private fields */ }Expand description
A TableSource over a watched directory tree of GraphAr/columnar
file drops — the local half of the Airflow AIP-82 story.
Each mapped table maps to a subdirectory root/<table>/; every file
in it with a recognised extension (parquet, orc, csv, json,
arrow) is a chunk. The set of already-ingested file names lives in
the table’s TableState::done_files ledger, so a new file drop
triggers exactly one sync round and nothing is re-read.
use knut_bifrost::source::FileSource;
let source = FileSource::new("/data/drops");Implementations§
Trait Implementations§
Source§impl TableSource for FileSource
impl TableSource for FileSource
Source§fn fetch_new<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
spec: &'life1 TableSpec,
state: &'life2 TableState,
) -> Pin<Box<dyn Future<Output = Result<Option<(Vec<RecordBatch>, TableState)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fetch_new<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
spec: &'life1 TableSpec,
state: &'life2 TableState,
) -> Pin<Box<dyn Future<Output = Result<Option<(Vec<RecordBatch>, TableState)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Return rows new since
state and the state to persist once they are
sunk, or None when nothing changed.Source§fn cdc_capability(&self, table: &str) -> Option<CdcCapability>
fn cdc_capability(&self, table: &str) -> Option<CdcCapability>
Which CDC backend this source resolved to for
table, and why. Read moreAuto Trait Implementations§
impl Freeze for FileSource
impl RefUnwindSafe for FileSource
impl Send for FileSource
impl Sync for FileSource
impl Unpin for FileSource
impl UnsafeUnpin for FileSource
impl UnwindSafe for FileSource
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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