Intermediate

Data Quality and Validation Framework

Define, run, and document automated data-quality checks with Great Expectations (GX Core 1.x), gating a pipeline so it fails loudly on bad data instead of silently loading it downstream.

~2.5h
0 / 8 steps
🚀
Intro

Before We Start

Prerequisites: Python 3.10-3.13 and a sample CSV or Postgres table to validate.

Great Expectations went through a significant API redesign with GX Core 1.0 (released 2024) — if you find an older tutorial using context.get_validator() or context.sources.add_postgres(), that's the pre-1.0 API and several of those calls have since been renamed or restructured. The current model chains together a DataSource, a Batch (the actual slice of data), an ExpectationSuite (the rules), a ValidationDefinition (which ties a suite to a batch), and a Checkpoint (which runs one or more validation definitions and can trigger actions like a Slack alert on failure).

You'll define an expectation suite for an orders dataset, run it as a validation gate, and wire a failure into stopping a downstream load — the same "fail loudly rather than load silently" principle that makes data quality checks worth the setup effort in the first place.

🔨

Install GX Core and create a Data Context

🔨

Define an expectation suite

🔨

Run validation with a Checkpoint

🔨

Gate a pipeline on validation results

🔨

Generate Data Docs

🎯
Secret Mission

Secret Mission: Add a Spark-backed data source

🧹
Wrap Up

Before You Go

Pro

Test what you just learned

Self-testing is one of the best ways to retain new skills. Unlock project quizzes to check your understanding.

Log in to unlock