pub struct DataQualityPlan {Show 15 fields
pub scope: QualityScope,
pub compute: QualityCompute,
pub method: SampleMethod,
pub dataset_rows: usize,
pub sample_seed: u64,
pub grain: QualityGrain,
pub comparison: QualityComparison,
pub baseline_segment: Option<String>,
pub temporal_roles: Vec<TemporalRoleAssignment>,
pub intervals: Option<Vec<(TemporalRole, TemporalRole)>>,
pub interval_clock: IntervalClock,
pub latency_threshold_seconds: Option<i64>,
pub time_formats: Vec<TimeInterpretation>,
pub expected: Option<ExpectedWindows>,
pub intent: DeclaredIntent,
}Fields§
§scope: QualityScope§compute: QualityCompute§method: SampleMethodHow a dataset-grain sample picks its rows, from the shared analysis sample.
dataset_rows: usizeRows a dataset-grain sample keeps: the shared analysis sample’s size.
sample_seed: u64§grain: QualityGrain§comparison: QualityComparison§baseline_segment: Option<String>§temporal_roles: Vec<TemporalRoleAssignment>§intervals: Option<Vec<(TemporalRole, TemporalRole)>>The intervals chosen under Intervals, start role to end role. None until
one is chosen: the suggested pairs the assigned roles make.
interval_clock: IntervalClockWhich time puts an interval in a time window.
latency_threshold_seconds: Option<i64>§time_formats: Vec<TimeInterpretation>Text columns read as time for this study, by grain and roles only.
expected: Option<ExpectedWindows>The time windows rows are expected in, when stated, making an empty window a gap. Applied to counted segments: changes the report, never the read.
intent: DeclaredIntentWhat the columns must hold, declared: the key and each column’s rules. Read from the rows the run reads; it decides no rows, so it is the report’s.
Implementations§
Source§impl DataQualityPlan
impl DataQualityPlan
Sourcepub fn requires_confirmation(&self) -> bool
pub fn requires_confirmation(&self) -> bool
Only a full scan asks first. Every grain reads the shared sample and cuts it into segments, so no grain reads more than the sample says.
pub fn comparison_label(&self) -> String
Sourcepub fn sample(&self) -> Sample
pub fn sample(&self) -> Sample
The shared analysis sample this plan carries, as the Sample form shows it.
Sourcepub fn adopt_sample(&mut self, sample: &Sample)
pub fn adopt_sample(&mut self, sample: &Sample)
Take sample as this plan’s rows: metadata-only stays so; else every row is a full
read, fewer a sampled one. Equal rows per value of a column sets that column as
the grain, only when the choice is new and no grain was set.
Sourcepub fn time_format(&self, column: &str) -> Option<&TimeInterpretation>
pub fn time_format(&self, column: &str) -> Option<&TimeInterpretation>
How column is read as time, when it is text read through a format.
Sourcepub fn time_value(&self, column: &str) -> Expr
pub fn time_value(&self, column: &str) -> Expr
A column’s values as time: parsed through its format when it has one, and as stored otherwise.
Sourcepub fn reads_as_time(&self, column: &str, schema: &Schema) -> bool
pub fn reads_as_time(&self, column: &str, schema: &Schema) -> bool
Whether column of schema can be read as time: a date or time type, or text
with a format.
Sourcepub fn role_column(&self, role: TemporalRole) -> Option<&str>
pub fn role_column(&self, role: TemporalRole) -> Option<&str>
The column a role is assigned to.
Sourcepub fn interval_pairs(&self) -> Vec<(TemporalRole, TemporalRole)>
pub fn interval_pairs(&self) -> Vec<(TemporalRole, TemporalRole)>
The intervals this plan measures: the chosen ones, or until one is chosen the suggested pairs; either way only those whose two roles are assigned.
Sourcepub fn candidate_pairs(&self) -> Vec<(TemporalRole, TemporalRole)>
pub fn candidate_pairs(&self) -> Vec<(TemporalRole, TemporalRole)>
Every start and end the assigned roles can make, the suggested pairs first, then the rest in role order: what Intervals in Setup lists.
Sourcepub fn toggle_interval(&mut self, pair: (TemporalRole, TemporalRole))
pub fn toggle_interval(&mut self, pair: (TemporalRole, TemporalRole))
Measure pair, or stop measuring it. The first choice makes the list
explicit, starting from what was measured.
Sourcepub fn unpaired_roles(&self) -> Vec<TemporalRole>
pub fn unpaired_roles(&self) -> Vec<TemporalRole>
Assigned roles that no measured interval uses: they measure nothing.
Sourcepub fn windows_intervals(&self) -> bool
pub fn windows_intervals(&self) -> bool
Whether the clock choice means anything: intervals cut into time windows.
Sourcepub fn interval_grain(&self, start: &str, end: &str) -> QualityGrain
pub fn interval_grain(&self, start: &str, end: &str) -> QualityGrain
The grain an interval from start to end is cut by: the plan’s, except
that time windows go by the interval’s own start or end when the clock says.
Sourcepub fn zoned(&self, column: &str, schema: &Schema) -> Option<bool>
pub fn zoned(&self, column: &str, schema: &Schema) -> Option<bool>
Whether column holds instants (a zoned type, or text read with an
offset) rather than times with no zone; None when it is not read as time.
Sourcepub fn same_measurement(&self, other: &Self) -> bool
pub fn same_measurement(&self, other: &Self) -> bool
Whether other measures the same, differing at most in expected windows or
comparison, both worked out from the report’s counts
(DataQualityResults::compare_segments).
Sourcepub fn compares_differently(&self, other: &Self) -> bool
pub fn compares_differently(&self, other: &Self) -> bool
Whether other compares segments differently from this plan.
Sourcepub fn expected_windows(&self) -> Option<&ExpectedWindows>
pub fn expected_windows(&self) -> Option<&ExpectedWindows>
The windows this plan expects rows in: only on a time-window grain.
Sourcepub fn coarser_grain(&self) -> Option<QualityGrain>
pub fn coarser_grain(&self) -> Option<QualityGrain>
The next coarser grain for thin segments (hour→day→week→month, a larger row chunk); none for partitions and files.
Trait Implementations§
Source§impl Clone for DataQualityPlan
impl Clone for DataQualityPlan
Source§impl Debug for DataQualityPlan
impl Debug for DataQualityPlan
Source§impl Default for DataQualityPlan
impl Default for DataQualityPlan
impl Eq for DataQualityPlan
Source§impl PartialEq for DataQualityPlan
impl PartialEq for DataQualityPlan
impl StructuralPartialEq for DataQualityPlan
Auto Trait Implementations§
impl Freeze for DataQualityPlan
impl RefUnwindSafe for DataQualityPlan
impl Send for DataQualityPlan
impl Sync for DataQualityPlan
impl Unpin for DataQualityPlan
impl UnsafeUnpin for DataQualityPlan
impl UnwindSafe for DataQualityPlan
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> Key for Twhere
T: Clone,
impl<T> Key for Twhere
T: Clone,
Source§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more