3 AM. Your phone buzzes. Production dashboards are down. Again.

A schema change in the upstream broke your entire Bronze to Gold pipeline. Customer-facing reports are frozen. Your Monday morning just became a firefighting sprint.
That’s the reality for many data engineers – we often build for scalability but underestimate the complexity of data reliability. And while we say that we have data quality checks, they’re usually scattered SQL scripts or ad-hoc notebooks that grow harder to maintain over time.
That got me thinking that there had to be a better way to automate and manage data validation without turning it into another rigid process.
This framework started as a thought and a weekend fun experiment to reduce our manual checks and quickly turned into a reusable accelerator.
So, we built a smarter way: A metadata-driven, parameterized validation framework for Databricks that moves data quality from reactive firefighting to proactive assurance.
Key Takeaways
If you’re skimming, here’s what you need to know:
- Metadata-driven config eliminates hardcoded validation logic
- 3-tier hierarchy scales from global rules to layer-specific to table-specific checks
- Native Databricks integration via PySpark + Delta Lake
Now, Imagine If Your Validation Could…
- Run automatically with every pipeline execution
- Scale across hundreds of tables – no code changes
- Catch schema drifts, missing data, and rule violations much sooner in the pipeline
Under the hood, it’s not magic – it’s a well-structured metadata layer that defines every rule, threshold and check.

A unified data validation layer embedded inside the Databricks Medallion architecture
The Framework: Metadata-Driven, Configurable and Scalable
At the heart of this framework lies a single YAML configuration file that defines all validation logic across your platform.
Why YAML? Because it’s version-controlled, human-readable and can be modified by data analysts without code deployments or engineering bottlenecks.
This design ensures consistency, scalability and zero-code extensibility across datasets and layers.
The configuration follows three levels of hierarchy:
1. Global Rules: Platform-Wide Standards
Define universal checks like schema validation, completeness, uniqueness, and outlier detection.

Think of this as your data governance baseline – applied to every dataset automatically.
2. Layer Defaults: Context-Aware Flexibility
Each layer (Bronze, Silver, Gold) inherits global rules but can override thresholds based on business criticality:

This enforces progressive data quality – looser in raw data, stricter in curated layers. Bronze can tolerate 80% completeness while Gold demands 95%+.
3. Table Configurations: Fine-Grained Customization
Each table defines its schema, integrity, and business validation logic – all driven by metadata, not code.

Want to add a new table or tweak a rule? Just update the config. No notebook edits. No redeploys. No PRs to merge.
Dynamic Rule Execution
The framework reads the YAML config, dynamically generates validation SQL tailored to each table’s rules, and executes them as distributed Spark jobs against your Delta tables.
Here’s how it works conceptually:
- Load config → Parse YAML and build validation registry
- Generate SQL → Create table-specific validation queries on-the-fly
- Execute distributed → Run as PySpark jobs across your cluster
- Aggregate results → Collect metrics, violations and quality scores
In practice, it looks like this:

Example in Action:
When you define completeness: { thresholds: { email: 0.9 } } in YAML, the framework generates:

If completeness drops below 90%, validation fails with detailed metrics – no manual SQL required.
One line to validate any table.
Fifty tables? Just list them in config and the framework handles the rest.
Built Natively for Databricks
Powered by PySpark and optimized for Delta Lake, the framework integrates directly into Databricks job workflows. Validation queries run as distributed Spark jobs – fast, efficient and scalable.

The framework includes built-in error handling and graceful degradation – if one validation fails, it logs the error and continues with others rather than crashing the entire pipeline.
What It Validates
- Schema validation → Catches column renames and type changes before they break pipelines
- Integrity checks → Ensures completeness, uniqueness and referential integrity across tables
- Business rules → Validates domain logic (e.g., “order_amount > 0”) via custom SQL
- Statistical validation → Detects distribution drift and outliers that signal data issues
- Anomaly detection → ML-based methods to catch patterns humans miss
Every run generates detailed logs with metrics, violation counts, and quality scores.

Why It’s Production-Ready
- Reusable Framework – Define once, apply everywhere (Bronze/Silver/Gold)
- Parameterized Configs – YAML controlled alert and validation thresholds Alert thresholds → environment-aware (dev: 0.7, prod: 0.9 quality score) – different alerting standards per environment Validation thresholds → layer-aware (Bronze: 80%, Gold: 95% completeness) – shared validation rules ensure consistency across environments
- Distributed Execution – Runs as Spark jobs, not single-threaded scripts
- Medallion-Aware Logic – Layer-specific validation strategies: Bronze → Schema compliance & ingestion quality Silver → Business rules & data cleaning validation Gold → KPI & aggregation accuracy
Measured Impact
In testing and practical application, this framework has demonstrated:
- Significant reduction in manual validation time through automation
- Faster detection of schema and data issues – surfaced during pipeline runs
- No broken pipelines due to schema drift when validations are active
- Higher trust- analysts now use validated data directly
Bad data isn’t just a technical issue – it’s a trust issue. This framework can rebuild that trust.
Example: Schema Validation in Action
Here’s how schema drift is caught automatically before it breaks downstream processes

If a source column changes — say customer_email disappears – you get a clear error before Silver/Gold layers break:

No more reactive debugging at 3 AM. Just proactive prevention at pipeline execution.
Why Not Just Use dbt Tests or Great Expectations?
Fair question. Both are excellent tools with strong communities:
dbt tests: Great for transformation validation, deeply integrated with the dbt workflow. If you’re already using dbt, it’s a natural fit.
Great Expectations(GX): Powerful and comprehensive. Ideal for complex data quality requirements across diverse platforms and use cases.
This framework: Purpose-built for Databricks + Delta Lake. Native Spark performance. Single YAML config scales from 10 to 1000 tables. Minimal learning curve for data teams already using Databricks.
When to use what:
- dbt tests → Perfect if you’re already in the dbt ecosystem and need transformation-focused validation
- Great Expectations(GX) → Ideal for complex data quality requirements across diverse platforms
- This framework → Best fit for Databricks-native teams wanting lightweight, metadata-driven validation
Choose the right tool for your context – or use them together!
What It Means for Your Team
Data Engineers: Stop writing repetitive validation SQL. Focus on building and not firefighting.
Data Architects: Enforce platform-wide quality standards with version-controlled rules.
Analytics Leaders: Trust your data pipelines – no more “trust but verify.”
The Takeaway
Data quality shouldn’t be an afterthought. With a metadata-driven validation framework, you can automate assurance, scale confidence and sleep peacefully in the night.
You don’t need a massive rewrite – just a smarter layer around your existing pipelines.
Start small. Pick one critical table. Prove the value. Then scale across your Databricks environment.
Let’s Discuss
I’d love to hear from the community:
Have you dealt with breaking production pipelines? How did you catch it – manual monitoring, automated tests or painful post-mortem investigations?
What’s your current validation strategy? Manual SQL checks, dbt tests, GX, custom frameworks, or something else?
Drop your experiences in the comments – let’s learn from each other!
