pub enum BatchCheck {
RowCount {
min: Option<usize>,
max: Option<usize>,
on_failure: OnFailure,
},
NullRate {
field: String,
max: f64,
on_failure: OnFailure,
},
Unique {
fields: Vec<String>,
on_failure: OnFailure,
},
DistinctCount {
field: String,
min: Option<usize>,
max: Option<usize>,
on_failure: OnFailure,
},
}quality only.Expand description
A per-batch check, evaluated per page over the survivors of the per-record pass.
Scope is one page, not the whole run — with a source batch_size of
1000, row_count sees 1000 rows at a time. Set the source’s
batch_size: 0 to evaluate these over the entire result set instead.
The aggregate checks (row_count / null_rate / distinct_count) cannot
blame an individual row, so they accept only OnFailure::Abort or
OnFailure::QuarantineBatch; unique is row-attributable and so
accepts quarantine or abort. Either way the wrong choice is rejected at
config load.
Variants§
RowCount
Survivor count is within [min, max] (at least one bound required).
Fields
NullRate
Null-or-missing rate of field across survivors is <= max.
Fields
Unique
The composite fields tuple is unique across survivors.
Fields
DistinctCount
Distinct values of field across survivors is within [min, max].
Fields
field: StringPath to the counted field. A missing field counts as its own
distinct value, separate from an explicit null.
Trait Implementations§
Source§impl Clone for BatchCheck
impl Clone for BatchCheck
Source§impl Debug for BatchCheck
impl Debug for BatchCheck
Source§impl<'de> Deserialize<'de> for BatchCheck
impl<'de> Deserialize<'de> for BatchCheck
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for BatchCheck
impl JsonSchema for BatchCheck
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for BatchCheck
impl RefUnwindSafe for BatchCheck
impl Send for BatchCheck
impl Sync for BatchCheck
impl Unpin for BatchCheck
impl UnsafeUnpin for BatchCheck
impl UnwindSafe for BatchCheck
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request