A data quality validation rule
A data quality rule is a single testable assertion about data: a column is never null, a value sits inside a range, an identifier is unique, a table was refreshed within the hour. Each rule is small and binary, and the discipline lies in choosing which assertions actually matter rather than testing everything.
An analytics team runs a model that computes daily active users. They attach four rules to it: user_id is unique, event_date is not null, the count stays within 50 percent of the trailing seven-day average, and the source table was loaded in the last two hours. One morning the freshness rule fails, the count rule passes, and the model is held back before it can publish a stale number to leadership. Tools like dbt tests and Great Expectations make rules like these declarative and run them on every pipeline execution.
The six widely cited dimensions, formalised by Wang and Strong in 1996, give a vocabulary for what rules check: accuracy, completeness, consistency, validity, timeliness, and uniqueness.
In the Unified Product Graph, a data quality rule sits in the data and analytics region and connects most directly to the things it protects. A metric is validated by a rule (Metricvalidated byData Quality Rulehierarchy), and rules associate with the metric_validated_by_data_quality_ruleData SourceData & AnalyticsA data source or integrationView reference → they test and the data_sourceData LineageData & AnalyticsA record of data origin and transformationsView reference → that traces failures. That metric edge is the meaningful one: it turns an abstract assertion into a guarantee attached to a specific business number, so you can ask which metrics are guarded and which are flying blind.data_lineage
Type-specific fields on BaseNode
rule_typestringQuality dimension this rule validates
test_typestringSpecific test implementation
column_refstringColumn or field this rule applies to
thresholdstringAcceptable threshold value for the rule
alert_on_breachbooleanWhether to send an alert when the rule is breached
last_run_statusstringResult of the most recent run
last_run_datestringISO date of the most recent run
idstringrequiredUnique identifier (UUID)
typeNodeTyperequiredDiscriminator for the entity type
titlestringrequiredDisplay name
descriptionstringOptional detailed description
statusstringLifecycle status
tagsstring[]Freeform tags for filtering
1 edge type connected to this entity.
metric_validated_by_data_quality_rule