Skip to main content
FA
Faiz Akram
HomeAboutExpertiseProjectsBlogContact
FA
Faiz Akram

Senior Technical Architect specializing in enterprise-grade solutions, cloud architecture, and modern development practices.

Quick Links

Privacy PolicyTerms of ServiceBlog

Connect

© 2026 Faiz Akram. All rights reserved.

Back to Blog
Production-Ready Data Validation Pipelines: Patterns, Tools, and Best Practices
Data Engineering

Production-Ready Data Validation Pipelines: Patterns, Tools, and Best Practices

F
Faiz Akram
October 28, 2026
8 min read

Modern data pipelines are only as reliable as the quality of the data moving through them. Inconsistent, malformed, or out-of-bounds data can silently corrupt downstream analytics, AI models, and business decisions. As the volume, velocity, and complexity of data grows, production-grade data validation is no longer optional—it's now a foundational requirement for any serious data engineering team.

What Is Data Validation in ETL Pipelines?

Data validation is the process of programmatically checking that data meets expected rules and constraints before it is ingested, transformed, or loaded into target systems. This often includes checks for schema adherence, nulls, ranges, referential integrity, and more. In my experience, the most robust data validation pipelines are declarative, version-controlled, automated, and tightly integrated with CI/CD and orchestration workflows.

A typical data validation configuration with Great Expectations (v0.16+) might look like this:

# great_expectations/expectations/orders_expectation_suite.json
{
  "expectation_suite_name": "orders.expectations",
  "expectations": [
    {
      "expect_column_values_to_be_in_set": {
        "column": "order_status",
        "value_set": ["PENDING", "SHIPPED", "CANCELLED"]
      }
    },
    {
      "expect_column_values_to_be_between": {
        "column": "order_total",
        "min_value": 0.01,
        "max_value": 100000.00
      }
    },
    {
      "expect_column_values_to_not_be_null": {
        "column": "customer_id"
      }
    }
  ]
}

Key insight: Declarative validation suites are versioned, testable, and integrate cleanly with orchestration tools.

Step 1: Define Data Quality SLAs and Critical Validation Rules

Why Data Quality SLAs Matter

Before writing a single line of validation code, you need to define what "good data" means for your business. This includes not just technical correctness, but also business logic—what percent of orders can have unknown status, what are the valid ranges for transaction amounts, and what error rates are tolerable in production. In regulated industries (finance, healthcare), these rules often reflect legal compliance requirements.

How I Establish Data Quality Rules

  1. Work with domain experts: Partner with business analysts and data stewards to enumerate critical fields, edge cases, and failure scenarios.
  2. Prioritize high-impact rules: Focus on validations that, if failed, would break downstream analytics or compliance. For example: referential integrity of customer IDs, null checks on revenue fields, or categorical enumerations for status columns.
  3. Document SLAs: For each rule, document the expected pass rate (e.g., 99.9% of order_total values must be non-null and positive), and what action to take on failure (block, quarantine, alert, or log).

Example SLA Table

Rule TypeFieldSLA (Pass Rate)Action on Failure
Not nullcustomer_id99.99%Quarantine row
Value in enumorder_status100%Block load
Numeric rangeorder_total99.5%Alert/Log

Key insight: Clear, measurable SLAs are the backbone of both technical enforcement and stakeholder trust.

Step 2: Choose the Right Data Validation Frameworks

Frameworks for Modern Data Validation

The right tool depends on your tech stack, data volumes, and operational needs. I typically evaluate frameworks by these criteria:

  • Language compatibility: Python (Great Expectations, Pandera), Scala/Java (Deequ), SQL (dbt tests)
  • Scalability: Can it validate 1B+ rows? Distributed execution? Spark support?
  • Integration: How well does it fit with Airflow, AWS Glue, Databricks, or other orchestration platforms?
  • Extensibility: Can you define custom checks or plug into CI/CD?

Popular Tools and Example Configurations

  • Great Expectations (v0.16+): Python and Spark, declarative JSON/YAML suites, integrates with Airflow, Databricks, AWS Glue. Example usage in Python:

    import great_expectations as ge
    df = ge.read_csv('orders.csv')
    results = df.validate(expectation_suite='orders.expectations')
    assert results['success']
    
  • Amazon Deequ (v2.0.0): Scala, Spark-native, scales to 100M+ rows. Example:

    import com.amazon.deequ.VerificationSuite
    val verificationResult = VerificationSuite()
      .onData(df)
      .addCheck(Check(CheckLevel.Error, "Data validation")
        .isComplete("customer_id")
        .isContainedIn("order_status", Array("PENDING","SHIPPED","CANCELLED"))
        .isNonNegative("order_total")
      ).run()
    
  • dbt (v1.6+): SQL-based, integrates with dbt Cloud, BigQuery, Snowflake. Example test:

    # models/orders.yml
    tests:
      - not_null:
          column_name: customer_id
      - accepted_values:
          column_name: order_status
          values: [PENDING, SHIPPED, CANCELLED]
    

Key insight: Tool choice should reflect scale, ecosystem, and collaboration—not just programming language.

Step 3: Integrate Validation into Orchestrated Data Pipelines

Why Orchestration Integration Is Critical

Standalone validation scripts quickly become brittle and forgotten. For production reliability, validation steps must be first-class citizens in your data pipeline orchestration—whether that's Apache Airflow, AWS Glue, Azure Data Factory, or Databricks Workflows. This ensures that bad data can't silently flow downstream, and that failures trigger automated remediation or alerting.

How I Integrate Validation Steps

  1. Pre-ingest validation: Before loading data into central lakes or warehouses, run lightweight checks (file size, schema, null rates) to filter out obviously bad batches.
  2. Post-ingest validation: After data lands, run full suite validation (column-level checks, referential integrity, business rules). If failures exceed SLAs, take action: quarantine, block, trigger incident workflows.
  3. Automated pipeline enforcement: In Airflow, use PythonOperator or BashOperator to invoke validation jobs, and control downstream tasks using Airflow's trigger rules. In AWS Glue, use Glue Jobs with embedded validation logic.

Example: Airflow DAG with Great Expectations

from airflow import DAG
from airflow.operators.python import PythonOperator
from great_expectations_provider.operators.great_expectations import GreatExpectationsOperator

def pre_ingest_check():
    # Lightweight checks, e.g., file size, schema
    pass

def post_ingest_validation():
    # Could be invoked via GE's Python API
    pass

def send_alert():
    # Integrate with PagerDuty, Slack
    pass

define_dag = DAG('orders_etl', schedule_interval='@hourly')

pre_check = PythonOperator(task_id='pre_ingest_check', python_callable=pre_ingest_check, dag=define_dag)
validate = GreatExpectationsOperator(
    task_id='validate_data',
    data_context_root_dir='/opt/great_expectations',
    expectation_suite_name='orders.expectations',
    dag=define_dag
)
alert = PythonOperator(task_id='send_alert', python_callable=send_alert, dag=define_dag)

pre_check >> validate >> alert

Key insight: Embedding validation in orchestrated pipelines guarantees enforcement and automated response.

Step 4: Monitor, Alert, and Continuously Improve Validation Coverage

Why Continuous Monitoring Matters

Validation is not a one-time event—production data evolves, schemas drift, and new edge cases emerge. Without robust monitoring and alerting, you'll miss silent data quality regressions that can corrupt downstream systems or analytics. I recommend:

  1. Centralized reporting: Store validation results in a queryable warehouse (e.g., Snowflake, BigQuery, Redshift) for time-series tracking and audits.
  2. Alerting and incident management: Integrate with PagerDuty, Opsgenie, or Slack to escalate when SLAs are breached.
  3. Coverage metrics: Track percentage of tables and columns covered by validation, and measure test efficacy (fail/pass rates, false positives).
  4. Feedback loops: Review validation failures in post-mortems, and iteratively expand or tune expectation suites based on real-world issues.

Example: Storing Validation Results in BigQuery

Great Expectations supports action stores that log results to BigQuery. Configure this in great_expectations.yml:

validation_operators:
  action_list_operator:
    action_list:
      - name: store_validation_result
        action:
          class_name: StoreValidationResultAction
      - name: store_evaluation_params
        action:
          class_name: StoreEvaluationParametersAction
      - name: send_slack_notification_on_validation_result
        action:
          class_name: SlackNotificationAction
          slack_webhook: $SLACK_WEBHOOK
      - name: bigquery_store_action
        action:
          class_name: BigQueryAction
          credentials_path: /etc/gcp/creds.json
          dataset: validation_results

Example Monitoring Dashboard

Use Looker or Tableau to visualize daily validation runs, SLA breaches, and trends in failure rates. Example queries:

SELECT DATE(validation_time) AS day, 
       COUNTIF(success=FALSE)/COUNT(*) AS failure_rate
FROM validation_results.orders
GROUP BY day
ORDER BY day DESC;

Key insight: Monitoring validation effectiveness in production is essential to evolving coverage and catching regressions early.

Comparison Table: Data Validation Frameworks at a Glance

FrameworkLanguageScalabilityIntegrationsStrengthsLimitations
Great ExpectationsPython/Spark10M–1B+ rowsAirflow, Glue, DatabricksDeclarative, extensible, UIMemory-bound in Python
Amazon DeequScala/Spark100M–10B+ rowsEMR, Databricks, GlueSpark-native, fast, incrementalScala required, less UI
dbt testsSQL1M–100M+ rowsdbt Cloud, Snowflake, BQEasy for SQL devs, CI-friendlyBasic checks, less custom
PanderaPython<10M rowsPandas, DaskType-safe, unit tests, ML flowsNot distributed
SodaCore/SodaCLPython/SQL10M–1B rowsAirflow, dbt, CI/CDYAML syntax, cloud SaaS optionSome features paid/SaaS

Key insight: For Spark-scale validation, Deequ is unmatched; for Python-centric teams, Great Expectations is the most extensible.

Frequently Asked Questions

Q: Can data validation slow down ETL pipelines at scale? A: Yes, poorly designed validation can become a bottleneck, especially in Python or single-node tools. To avoid this, run checks in distributed engines (Spark with Deequ or GE), validate only critical columns, and sample large datasets for non-critical rules.

Q: How do I handle schema drift or evolving validation rules in production? A: Use version-controlled expectation suites, enforce explicit schema versioning (e.g., Avro/Parquet schemas), and automate regression tests in CI/CD. Automate alerts when new columns appear or rules are breached, and require code review for suite updates.

Q: What are best practices for integrating validation with CI/CD? A: Run validation suites as part of pull request checks using GitHub Actions, GitLab CI, or Jenkins. Fail builds if critical rules are broken, and publish validation reports as pipeline artifacts to enable review before merging or deploying changes.

Key Takeaways

  • Define business-driven data quality SLAs and critical validation rules before automating tests.
  • Choose frameworks (Great Expectations, Deequ, dbt) based on scale, language, and pipeline integration needs.
  • Integrate validation steps directly into orchestrated ETL pipelines for reliable enforcement and automated remediation.
  • Centralize validation results, monitor coverage and SLA breaches, and iterate rules based on real-world issues.
  • Invest in CI/CD automation and version control for validation suites to catch schema drift early.
  • For Spark-scale and real-time ETL, prefer distributed validation frameworks to avoid pipeline bottlenecks.

Tags

data engineeringdata validationdata qualityETL pipelinesgreat expectationsdeequ

Share this article

Found it helpful? Share it with your network.

X / TwitterLinkedInFacebookWhatsApp

Related Articles

More on Data Engineering and related topics

Production-Ready Data Pipeline Orchestration: Airflow, Dagster, and Prefect Compared
Data Engineering
October 20, 2026
7 min read

Production-Ready Data Pipeline Orchestration: Airflow, Dagster, and Prefect Compared

Learn how to build and operate robust, scalable data pipeline orchestration with Apache Airflow, Dagster, and Prefect. Best practices, real configs, and tool trade-offs.

data pipelinesworkflow orchestrationairflow
Read More
Designing Near-Real-Time Data Pipelines with Apache Kafka and Debezium
Data Engineering
October 12, 2026
7 min read

Designing Near-Real-Time Data Pipelines with Apache Kafka and Debezium

Learn how to build near-real-time data pipelines using Apache Kafka and Debezium for scalable, low-latency event streaming in production environments.

data engineeringapache kafkadebezium
Read More
Designing Reliable Data Deletion Pipelines: Architecture, Tools, and Compliance Patterns
Data Engineering
October 4, 2026
7 min read

Designing Reliable Data Deletion Pipelines: Architecture, Tools, and Compliance Patterns

Learn how to build robust, audit-friendly data deletion pipelines that meet GDPR, CCPA, and production-scale compliance requirements using modern data engineering tools.

data engineeringdata deletionGDPR compliance
Read More