Data quality · Quality Foundations

What is Great Expectations?

Mediumgreat expectationsexpectationsvalidationdata docs

Interview question

What is Great Expectations, and how do teams use it for data quality?

How to answer

The short answer

Great Expectations (GX) is an open-source data quality framework. You declare Expectations (rules about a batch of data), validate batches against them, and get human-readable reports called Data Docs.

Mental model

Example expectations (conceptual)

  • expect_column_values_to_not_be_null on order_id
  • expect_column_values_to_be_unique on order_id
  • expect_column_values_to_be_between on amount (min=0)
  • expect_column_values_to_be_in_set on status
  • expect_table_row_count_to_be_between for volume sanity

Where it sits

  • After load, before publishing curated tables
  • In CI against sample fixtures
  • As a scheduled checkpoint on warehouse tables

vs dbt tests

dbt tests live next to SQL models and are warehouse-native. GX is richer for profiling, docs, and multi-source batches (files, Spark, DBs). Many stacks use both.

Interview tip: "GX = declarative expectations + validation + docs." Name 2-3 expectation types and say it gates bad data before consumers see it.