Registry /
workflow / airflow-provider-great-expectations
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.10
✕ build_error
4/8 runs
py 3.11
✕ build_error
4/8 runs
py 3.12
✕ build_error
4/8 runs
py 3.13
✕ build_error
4/8 runs
py 3.9
✕ build_error
4/8 runs
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
GXValidateDataFrameOperator
✓ from great_expectations_provider.operators.validate_dataframe import GXValidateDataFrameOperator
✗ from great_expectations_provider.operators.great_expectations import GreatExpectationsOperator
The `GreatExpectationsOperator` is deprecated and replaced by specialized operators in 1.0.0.
GXValidateBatchOperator
✓ from great_expectations_provider.operators.validate_batch import GXValidateBatchOperator
GXValidateCheckpointOperator
✓ from great_expectations_provider.operators.validate_checkpoint import GXValidateCheckpointOperator
This quickstart demonstrates how to use the `GXValidateDataFrameOperator` to validate a Pandas DataFrame in an Airflow DAG. The `configure_dataframe` parameter takes a callable that returns the DataFrame, and `configure_expectations` takes a callable that returns an `ExpectationSuite` (or a single `Expectation`) to apply the validation.
from __future__ import annotations
import pendulum
from airflow.models.dag import DAG
from airflow.operators.python import PythonOperator
from great_expectations_provider.operators.validate_dataframe import GXValidateDataFrameOperator
import pandas as pd # Import pandas here as per best practice, not top-level if heavy
from great_expectations.core import ExpectationSuite, ExpectationConfiguration # For defining expectations
def _get_dataframe():
# Simulate loading data into a Pandas DataFrame
data = {
'col_a': [1, 2, 3, 4, 5],
'col_b': ['a', 'b', 'c', 'd', 'e']
}
return pd.DataFrame(data)
def _get_expectations_suite(context):
# Define expectations. 'context' is the AbstractDataContext passed by the operator.
suite = context.suites.add_or_update(ExpectationSuite(name='my_expectation_suite'))
suite.add_expectation(ExpectationConfiguration(
expectation_type='expect_column_to_exist',
kwargs={'column': 'col_a'}
))
suite.add_expectation(ExpectationConfiguration(
expectation_type='expect_column_values_to_be_of_type',
kwargs={'column': 'col_a', 'type': 'int64'}
))
return suite
with DAG(
dag_id="great_expectations_dataframe_validation_dag",
start_date=pendulum.datetime(2023, 1, 1, tz="UTC"),
catchup=False,
schedule=None,
tags=["great_expectations", "data_quality"],
) as dag:
validate_dataframe_task = GXValidateDataFrameOperator(
task_id="validate_my_dataframe",
configure_dataframe=_get_dataframe,
configure_expectations=_get_expectations_suite,
)
# Example of a downstream task that would run if validation passes
success_task = PythonOperator(
task_id="data_quality_passed",
python_callable=lambda: print("Data quality checks passed!"),
)
validate_dataframe_task >> success_task
Upgrade
Version history
1.0.0latest on PyPI · released Jan 28, 2026
Audit
Dependencies
apache-airflowrequiredRequired for Airflow DAG orchestration. Version 1.0.0+ of the provider requires Apache Airflow 2.1+.
great-expectationsrequiredThe core data validation framework. Version 1.0.0+ of the provider requires Great Expectations 1.7.0+.