Data governance
7 min

Data Quality vs Data Validation: Where the Rule Lives

Key takeaways

  • Data validation is a check of one batch against a rule at a gate, returning pass or fail. Data quality is the standing measure of fitness for use, scored by dimension and tracked over time. Each validation rule feeds the quality score.
  • In DQDL, an ODCS SQL rule, a Snowflake data metric function, a Soda check, and a Great Expectations assertion, the rule is a column name, a metric or expression, and a threshold, in a syntax the tool owns.
  • The Open Data Contract Standard writes the pattern into its schema: four rule types ending in "custom" for "vendor-specific checks", with the meaning of the column held at the end of a link.
  • Two tables can pass every assertion and still disagree about what a customer is. The disagreement is about the definition, and no rule type in those frameworks has a field for it.
  • SHACL is validation that is also a W3C standard. The shape targets a class in the model, runs on any conforming validator, and returns a report that is itself RDF, readable by a catalog or an agent.
In this article
Share

A platform engineer has a validation suite on the orders pipeline. Every load runs forty assertions: order id never null, country code in the allowed list, row count above yesterday's. Last night all forty passed. This morning the quality dashboard scores the same table at 71 percent. The data quality vs data validation question starts there. Both read the same columns and disagree.

Data validation is a check of one batch against a rule, run at a gate, returning pass or fail. Data quality is the standing measure of how well the data fits its use, scored by dimension and tracked over time. The difference a buyer feels is where the rule lives. In every validation framework the rule is written in a syntax the framework owns and returns a result the framework reports. Our post What Is Data Quality? covers the dimensions and the score. This article covers the rule.

Validation is the rule at the gate. Quality is the standing score the rules add up to. In every framework the rule is a boolean on a column that stays where it was written. One validation language is a W3C standard whose rule targets the concept and whose report is data.

What is the difference between data quality and data validation?

Validation asks whether these rows pass this rule, now. Quality asks how fit this data is for its use, across dimensions and over time. DAMA UK's 2013 white paper, the source of the six dimensions DAMA-DMBOK carries, places validation inside one of them. Data are valid "if it conforms to the syntax (format, type, range) of its definition" (DAMA UK, 2013).

The difference, question by question

QuestionData validationData quality
What is the unit?One batch, one rule, one runA dataset or a domain, over time
What does it return?Pass or fail, and the rows that failedA score per dimension, trended
When does it run?At a gate: ingestion, a pipeline step, a mergeOn a schedule, against standing rules
Who writes the rule?The engineer, in the framework's syntaxThe steward, in the platform's rule builder
What does it assume?That the rule is rightThat the definition under the rules is right

What does a validation rule look like in each framework?

One rule from each framework, as its own documentation prints it, read on 2026-11-26. Five belong to the tool or platform that runs them. The sixth is a W3C Recommendation.

AWS Glue: a DQDL ruleset

AWS defines DQDL as "a domain specific language that you use to define rules for AWS Glue Data Quality" (AWS Glue DQDL reference). A ruleset is a list named Rules:

Rules = [
   IsComplete "order-id",
   IsUnique "order-id"
]

A SQL rule in an ODCS contract

The Open Data Contract Standard's sql rule type holds "A single SQL query that returns either a numeric or boolean value for comparison". The query is written "in the SQL dialect specific to the provided server" (Bitol, ODCS):

quality:
  - id: sql_count_not_null
    type: sql
    query: |
      SELECT COUNT(*) FROM {object} WHERE {property} IS NOT NULL
    mustBeLessThan: 3600

Snowflake: a data metric function

A Snowflake data metric function, or DMF, "measures an attribute of your data such as how many NULL values exist in a column" (Snowflake documentation). One statement attaches a system DMF to a column (Snowflake, set up DMFs):

ALTER TABLE t ADD DATA METRIC FUNCTION SNOWFLAKE.CORE.NULL_COUNT ON (c1);

Soda: a check in YAML

Soda's home page declares a freshness check on an orders table in YAML (soda.io, page marker 2026-11-25):

checks:
  - freshness:
      column: order_datetime
      threshold:
        unit: hour
        must_be_less_than_or_equal: 24

Great Expectations: a Python assertion

Great Expectations calls its rule an Expectation, "a verifiable assertion about data" (GX Core overview). The GX 1.25.0 guide builds one like this (Great Expectations, "Create an Expectation"):

preset_expectation = gx.expectations.ExpectColumnMaxToBeBetween(
    column="passenger_count", min_value=1, max_value=6, severity="warning")

SHACL: a shape on a class

SHACL, the W3C Shapes Constraint Language, is "a language for validating RDF graphs against a set of conditions" (W3C Recommendation, 20 July 2017). The specification's first example opens with a target class and one property constraint:

ex:PersonShape
    a sh:NodeShape ;
    sh:targetClass ex:Person ;
    sh:property [
        sh:path ex:ssn ;
        sh:maxCount 1 ;
        sh:datatype xsd:string ;
        sh:pattern "^\\d{3}-\\d{2}-\\d{4}$" ;
    ] ;

Five of the six say the same thing: a column, a metric or an expression, a threshold.

Where each rule lives

FrameworkWritten againstRuns onReturns
AWS Glue DQDLA column and an expressionGlue jobs and the Data CatalogPass or fail per rule
ODCS sql rule, in the server's dialectA column and a queryThe engine named in the contractA number or a boolean
Snowflake DMFA column on one tableThe table it is attached toA count or a percentage
Soda checkA column and a thresholdSodaPassed, Failed, or Error
Great Expectations, in PythonA column and parametersWherever GX runsA Validation Result
SHACL shape, W3C since 2017A class in a modelAny conforming validatorA validation report, itself an RDF graph

Our post Data Quality Rules: Examples, and Why the Rule Has to Travel writes the same five rules across these languages, row by row. The point they share is the one that matters here: the rule stays where it was written.

Is data validation part of data quality?

Yes. Validation is the mechanism and quality is the measure built from it. The Open Data Contract Standard writes that into its schema with four rule types (Bitol, ODCS, read 2026-11-26).

The four ODCS rule types

  • text. "A human-readable text that describes the quality of the data."
  • library. Predefined metrics such as nullValues and duplicateValues, each with a threshold.
  • sql. One query, in the server's dialect, returning a number or a boolean.
  • custom. "Custom rules allow for vendor-specific checks, including tools like Soda, Great Expectations, dbt-tests, Montecarlo, and others."

The place for what the column means sits beside the rule, as a link: "Authoritative definitions indicate the link to external definition." Our post Data Product vs Data Contract: A Contract Is Not a Definition follows that link to its end. Our post Data Quality Standards Compared: ISO 8000, DAMA, ODCS and SHACL lays the four standards side by side.

What can a validation rule say, and what can it not?

The orders table passed forty assertions and scores 71 percent because the score also weighs a consistency rule nobody put at the gate: the customer count in orders disagrees with the count in billing. A reconciliation rule can score the gap. No rule above can score why it exists. Orders counts a customer as anyone who placed an order. Billing counts a customer as anyone with an invoice. The disagreement is about the definition, and the rules were written for values. Every tool can score the values. None of them can say what the column means.

What a validation rule says, and what it leaves out

  • It says the values pass. Type, format, range, nulls, uniqueness, referential integrity.
  • It says nothing about the definition. Whether the column is the thing the rule assumes is a question about the governed definition, and no rule type above has a field for it.
  • It says nothing about who stands behind it. A definition with an approver and a review date can be cited to a regulator or an agent. A pass rate cannot.

Referential integrity inside one database and the integrity of a definition across databases are different tests. Our post Data Quality vs Data Integrity: Intact and Right Are Different Tests separates them.

How is SHACL validation different?

SHACL is validation in the engineer's sense: a rule run against data, returning a result. Three things differ. The rule language is a W3C standard, so a shape validates on any conforming engine. The rule targets a class in a model, so it is attached to the definition and travels with it. And the result is data: "The result of a validation process is an RDF graph with exactly one SHACL instance of sh:ValidationReport" (W3C, 2017). A catalog can display that report and an agent can read it, because it is in the same standard as the model.

Cortés, Ehrlinger, Etcheverry, and Naumann write: "we defined SHACL shapes for 69 data quality metrics proposed by Zaveri et al. and implemented a prototype that automatically instantiates these shapes and computes the corresponding data quality measures from their validation results" (arXiv 2507.22305, ISWC 2025 workshop, v3 dated 2025-09-14). Our post What Is SHACL? explains the language. Our post How to Validate an Ontology with SHACL walks through a run. Our post Metadata Quality: How to Measure It and What to Do About It already uses shapes as quality rules on the record about the data.

What does the EU AI Act ask of validation?

Article 10 of Regulation (EU) 2024/1689 uses the word in the machine-learning sense: paragraph 1 covers "training, validation and testing data sets". The page marks that paragraph as amended. Paragraph 3 reads like a validator's checklist. Paragraph 2(d) asks for something no gate check produces. It requires "the formulation of assumptions, in particular with respect to the information that the data are supposed to measure and represent" (Article 10, read 2026-11-26). A passing run is evidence for paragraph 3. The assumption in 2(d) is a definition, and a shape on it is the testable form. The page, read on 2026-11-26, gives 2 December 2027 for high-risk systems under Annex III and 2 August 2028 under Annex I. Those dates moved during 2026; read the page before you plan.

Where does TopQuadrant fit?

Keep the validation suite. TQ Data Foundation leaves it in place. It holds what those rules assume: the definition of the thing in the column, on RDF, OWL, and SHACL, with a named owner and a version. The rule on that definition is a SHACL shape, a standard TopQuadrant helped author, enforced in the data as policy-as-code, SHACL constraints, and validation rules. AI proposes the model and the mappings; your experts confirm them. Agents receive the definition and the rule over MCP, a Python SDK, and REST. Your catalog stays, and it syncs.

Pick the assertion on your most-joined column. Then look for the sentence that says what that column is, in a form the same engine could check. If the assertion exists and the sentence does not, the rule lives in the tool and the meaning lives nowhere. TopQuadrant puts the meaning on a standard and the rule on the meaning. The gate keeps checking values. TQ Data Foundation says what they are.

Give your AI the context it's been missing

See how the TQ Data Foundation turns your enterprise knowledge into trusted, Al-ready context.