pub struct QualityRule {Show 32 fields
pub id: Option<String>,
pub rule_type: Option<String>,
pub name: Option<String>,
pub dimension: Option<String>,
pub description: Option<String>,
pub business_impact: Option<String>,
pub severity: Option<String>,
pub method: Option<String>,
pub unit: Option<String>,
pub metric: Option<String>,
pub rule: Option<String>,
pub arguments: Option<Value>,
pub must_be: Option<Value>,
pub must_not_be: Option<Value>,
pub must_be_greater_than: Option<Value>,
pub must_be_greater_or_equal_to: Option<Value>,
pub must_be_less_than: Option<Value>,
pub must_be_less_or_equal_to: Option<Value>,
pub must_be_between: Option<Vec<Value>>,
pub must_not_be_between: Option<Vec<Value>>,
pub must_be_in: Option<Vec<Value>>,
pub must_not_be_in: Option<Vec<Value>>,
pub query: Option<String>,
pub engine: Option<String>,
pub implementation: Option<Value>,
pub url: Option<String>,
pub scheduler: Option<String>,
pub schedule: Option<String>,
pub authoritative_definitions: Vec<AuthoritativeDefinition>,
pub tags: Vec<String>,
pub custom_properties: Vec<CustomProperty>,
pub extra: IndexMap<String, Value>,
}Expand description
Quality rule for data validation (ODCS v3.1.0)
Quality rules can be defined at contract, schema, or property level. Field order matches the ODCS v3.1.0 JSON schema for stable serialization.
Fields§
§id: Option<String>Stable identifier for the quality rule
rule_type: Option<String>Type of quality rule (e.g., “sql”, “custom”, “library”, “text”)
name: Option<String>Name of the data quality check
dimension: Option<String>Quality dimension (e.g., “accuracy”, “completeness”, “timeliness”)
description: Option<String>Description of the quality rule
business_impact: Option<String>Consequences of rule failure (e.g., “operational”, “regulatory”)
severity: Option<String>Severity of the quality rule (e.g., “info”, “warning”, “error”)
method: Option<String>Method of validation (e.g., “reconciliation”)
unit: Option<String>Unit the rule uses (e.g., “rows”, “percent”)
metric: Option<String>Predefined metric name (e.g., “nullValues”, “missingValues”, “rowCount”)
rule: Option<String>Deprecated: use metric instead
arguments: Option<Value>Additional arguments for the metric
must_be: Option<Value>Condition that must be true (equals)
must_not_be: Option<Value>Condition that must be false (not equals)
must_be_greater_than: Option<Value>Greater than condition
must_be_greater_or_equal_to: Option<Value>Greater than or equal condition (ODCS: mustBeGreaterOrEqualTo)
must_be_less_than: Option<Value>Less than condition
must_be_less_or_equal_to: Option<Value>Less than or equal condition (ODCS: mustBeLessOrEqualTo)
must_be_between: Option<Vec<Value>>Range: value must be between two numbers [min, max]
must_not_be_between: Option<Vec<Value>>Range: value must not be between two numbers [min, max]
must_be_in: Option<Vec<Value>>Value must be in this set
must_not_be_in: Option<Vec<Value>>Value must not be in this set
query: Option<String>SQL query for validation
engine: Option<String>Engine for running the quality check (e.g., “soda”, “great-expectations”)
implementation: Option<Value>Engine-specific implementation details (string or object)
url: Option<String>URL to quality tool or dashboard
scheduler: Option<String>Scheduler type for quality checks (e.g., “cron”)
schedule: Option<String>Schedule expression (e.g., “0 20 * * *”)
Links to authoritative definitions
Tags for categorization
custom_properties: Vec<CustomProperty>Additional properties for rule execution
extra: IndexMap<String, Value>Additional properties not explicitly modeled (stable sorted order)
Trait Implementations§
Source§impl Clone for QualityRule
impl Clone for QualityRule
Source§fn clone(&self) -> QualityRule
fn clone(&self) -> QualityRule
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more