pub struct ProfilingSpec {
pub columns: Vec<String>,
pub exclude: Vec<String>,
pub max_columns: usize,
pub top_values: usize,
pub categorical_max_distinct: u64,
pub window: u32,
pub min_history: u32,
pub method: AnomalyMethod,
pub sensitivity: Option<f64>,
pub new_value_min_share: f64,
pub psi_threshold: f64,
pub on_drift: OnProfileDrift,
}Expand description
Learned column profiles with drift detection. Every run profiles the records it wrote (null rate, distinct count, min / max / mean, string length, type mix, top values) into a bounded-memory sketch, compares the result against a rolling baseline of earlier successful runs, and reports statistically significant changes per column — no thresholds to write.
Fields§
§columns: Vec<String>Top-level columns to profile. Empty (the default) profiles every
column the run writes, up to max_columns.
exclude: Vec<String>Columns to leave out, exact names or prefix* globs. Defaults to
["_faucet_*"] so the run-metadata columns are never profiled.
max_columns: usizeMaximum columns profiled per run (default 200). Columns beyond the cap are skipped and the profile is marked truncated.
top_values: usizeHow many most-frequent values to keep per categorical column (default
10). 0 disables top values entirely.
categorical_max_distinct: u64A column whose estimated distinct count exceeds this is treated as high-cardinality: only null / type / length metrics are kept for it and no values are published (default 100).
window: u32Rolling-window size: how many recent successful-run profiles form the
baseline (default 20; must be ≥ min_history).
min_history: u32Minimum baseline runs before drift detection starts (default 5; at least 2).
method: AnomalyMethodHow a numeric metric (null rate, distinct count, mean, …) is compared
against its baseline series. Default zscore.
sensitivity: Option<f64>Detection threshold for numeric metrics. zscore: max |x − mean| / std
(default 3.0). iqr: Tukey fence multiplier (default 1.5).
A categorical value never seen in the baseline is reported once its share of the run’s values reaches this fraction (default 0.05).
psi_threshold: f64Population stability index above which a categorical column’s value distribution counts as drifted (default 0.2; the conventional “significant shift” threshold).
on_drift: OnProfileDriftWhat a detected drift does to the run. Default warn.
Implementations§
Trait Implementations§
Source§impl Clone for ProfilingSpec
impl Clone for ProfilingSpec
Source§impl Debug for ProfilingSpec
impl Debug for ProfilingSpec
Source§impl Default for ProfilingSpec
impl Default for ProfilingSpec
Source§impl<'de> Deserialize<'de> for ProfilingSpec
impl<'de> Deserialize<'de> for ProfilingSpec
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 ProfilingSpec
impl JsonSchema for ProfilingSpec
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 moreSource§impl PartialEq for ProfilingSpec
impl PartialEq for ProfilingSpec
Source§impl Serialize for ProfilingSpec
impl Serialize for ProfilingSpec
impl StructuralPartialEq for ProfilingSpec
Auto Trait Implementations§
impl Freeze for ProfilingSpec
impl RefUnwindSafe for ProfilingSpec
impl Send for ProfilingSpec
impl Sync for ProfilingSpec
impl Unpin for ProfilingSpec
impl UnsafeUnpin for ProfilingSpec
impl UnwindSafe for ProfilingSpec
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