GX Core

GX Core is a Python library that provides a programmatic interface for building and running data validation workflows.

Reviewed by 7wData

On this page

Publisher review

GX Core is a Python library that provides a programmatic interface for building and running data validation workflows. It is designed for data engineers, data scientists, and analysts who need to define and enforce data quality rules in both interactive exploratory settings and production deployments. The library is the open-source foundation of the Great Expectations ecosystem, offering a flexible, code-driven approach to data testing without requiring a graphical user interface. GX Core is particularly suited for teams that want to integrate data validation into existing Python-based pipelines, CI/CD processes, or orchestration tools like Airflow and Prefect, as its Python-native design allows for seamless embedding. It is not a turnkey solution for non-technical users; instead, it empowers developers to write verifiable assertions about their data programmatically, making it a core tool for organizations that prioritize data reliability and reproducibility.

GX Core operates through a defined workflow pattern: setting up a GX environment, connecting to data, defining Expectations, and running validations. The environment is managed by a Data Context object, which holds configurations, metadata, and validation results. Users connect to data via Data Sources, which support various data stores including databases, schemas, and data files in cloud object storage (e.g., AWS S3, Google Cloud Storage). Within a Data Source, Data Assets represent collections of records (like tables or query results), and Batch Definitions organize these records into Batches for validation. Expectations are verifiable assertions about data, similar to unit tests in Python; GX Core ships with over 100 built-in Expectations covering common checks like column value ranges, null counts, uniqueness, and pattern matching. Expectation Suites bundle multiple Expectations for streamlined validation across different tables or backends. The library version 1.18.0 (as of the latest documentation) continues to evolve, with community contributions expanding the Expectation Gallery available at great_expectations.io/expectations.

In the data quality tool landscape, GX Core is one of the most prominent open-source options, often compared to Soda Core and dbt tests. According to the dataroots State of Data Quality report (November 2023), Great Expectations stands out for its extensive integrations with major cloud providers and its library of over 100 Expectations. However, Soda Core is noted for its SQL/YAML-based approach, which some teams find easier to set up for real-time monitoring, while GX Core's Python-centric design offers greater flexibility for complex, programmatic validations. Community sentiment on platforms like Reddit is mixed: some users praise GX Core's ability to run the same Expectation Suites across different tables and backends, while others criticize its complexity and learning curve. The library's integration with dbt is a notable strength, allowing teams to combine transformation testing with data quality checks. GX Core is free under the Developer plan, but advanced features like cloud-hosted dashboards and team collaboration require paid Team or Enterprise plans, which can be a consideration for organizations scaling their data quality efforts.

The honest trade-offs with GX Core center on its complexity and operational overhead. While it offers powerful programmatic control, the learning curve is steep, especially for teams new to data testing or Python. Setting up a Data Context, configuring Data Sources, and writing custom Expectations require significant upfront investment. Performance can be a concern when validating large datasets, as GX Core processes data in memory through Pandas or Spark, potentially leading to slower execution compared to SQL-based tools like Soda. The library's documentation, though comprehensive, can be overwhelming for beginners, and community support varies. Additionally, GX Core's reliance on Expectation Suites means that maintaining and versioning these suites across multiple environments (dev, staging, production) requires disciplined CI/CD practices. The free Developer plan is limited to local use, and the paid Team/Enterprise plans are necessary for cloud features, which may not fit all budgets. Despite these drawbacks, GX Core remains a strong choice for teams that need a flexible, code-driven data validation framework and are willing to invest in setup and maintenance.

Get the AI & data signal, daily.

335k+ subscribers read this every morning. One email, both newsletters. Unsubscribe anytime.

How it works

  1. Programmatic data validation

    GX Core provides a Python library for building and running data validation workflows programmatically, suitable for both interactive and production use.

  2. Expectation Suites

    Users define Expectation Suites, collections of verifiable assertions (Expectations) about data, which can be reused across different tables and backends.

  3. Data Context management

    The Data Context object orchestrates workflows, holding configurations, metadata, and validation results for all GX components.

  4. Multi-source data connection

    Data Sources connect to various data stores including databases, schemas, and cloud object storage files, with Data Assets representing tables or query results.

  5. Batch partitioning

    Batch Definitions organize records within a Data Asset into Batches, enabling partitioned validation for large datasets.

  6. Extensive Expectation library

    Over 100 built-in Expectations are available, covering common checks like null counts, value ranges, uniqueness, and pattern matching.

  7. Integration with orchestration tools

    GX Core integrates with Airflow, Prefect, and dbt, allowing data validation to be embedded in existing pipeline workflows.

Strengths and trade-offs

Strengths

  • GX Core offers over 100 built-in Expectations, providing a wide range of verifiable assertions for common data quality checks.
  • The library's Python-native design allows seamless integration with orchestration tools like Airflow and Prefect for production deployments.
  • Expectation Suites can be reused across different tables and backends, enabling consistent validation across diverse data sources.
  • GX Core is free under the Developer plan, making it accessible for individual developers and small teams to start with data validation.

Trade-offs

  • GX Core has a steep learning curve, requiring significant upfront investment in understanding Data Contexts, Data Sources, and Expectation Suites.
  • Performance can degrade with large datasets because GX Core processes data in memory through Pandas or Spark, unlike SQL-based tools.
  • The free Developer plan lacks cloud-hosted dashboards and collaboration features, which are only available in paid Team or Enterprise plans.
  • Community sentiment on platforms like Reddit indicates frustration with the library's complexity and occasional instability in production workflows.

Pricing context

GX Core is free under the Developer plan. Team and Enterprise plans offer advanced features like cloud dashboards and collaboration, with pricing available on request.

Getting started with GX Core

  1. Install GX Core

    Install the GX Core Python library using pip: `pip install great_expectations`. This installs the open-source library along with its dependencies, including Pandas for data processing. Verify the installation by importing the library in a Python script.

  2. Initialize a Data Context

    Run `great_expectations init` in your project directory to create a Data Context. This sets up the configuration files and metadata store that GX Core uses to manage your validation workflows. The Data Context is the central object for all operations.

  3. Connect to a data source

    Use the Data Context to add a Data Source, such as a PostgreSQL database or a CSV file. For example, call `context.sources.add_pandas_filesystem` to connect to a local directory of CSV files. Provide a name and the base path to the data.

  4. Define an Expectation Suite

    Create an Expectation Suite by calling `context.add_expectation_suite('my_suite')`. Then add Expectations like `expect_column_values_to_not_be_null` for a specific column. This suite bundles multiple assertions that can be reused across different data assets.

  5. Run a validation

    Execute validation by creating a Batch Request for a Data Asset and calling `context.run_validation`. Pass the Expectation Suite name and the Batch Request. The results are stored in the Data Context, and you can review them programmatically or export them for reporting.

Frequently Asked Questions

What is GX Core and what does it do?

GX Core is an open-source Python library for building and running data validation workflows programmatically. It allows data engineers and scientists to define and enforce data quality rules in both interactive and production settings without a graphical interface.

How does GX Core work for data validation?

GX Core uses a defined workflow: set up a GX environment with a Data Context, connect to data via Data Sources, define Expectations as verifiable assertions, and run validations. Expectation Suites bundle multiple Expectations for reuse across different tables and backends.

What are the key features of GX Core?

Key features include programmatic data validation, over 100 built-in Expectations, Expectation Suites for reusable assertions, Data Context management, multi-source data connection, batch partitioning, and integration with orchestration tools like Airflow and Prefect.

How does GX Core compare to Soda Core?

GX Core is Python-centric, offering greater flexibility for complex validations, while Soda Core uses a SQL/YAML approach that some find easier for real-time monitoring. GX Core has extensive integrations and over 100 Expectations, but Soda Core may be simpler to set up.

What are the main drawbacks of GX Core?

GX Core has a steep learning curve, requiring significant upfront investment. Performance can degrade with large datasets due to in-memory processing via Pandas or Spark. The free Developer plan lacks cloud features, and community feedback notes complexity and occasional instability.

Is GX Core free to use?

GX Core is free under the Developer plan for local use. Paid Team and Enterprise plans offer advanced features like cloud-hosted dashboards and team collaboration, with pricing available on request. This makes it accessible for individuals but costly for scaling teams.

Alternatives

How GX Core compares

Direct head-to-head against 3 competitors. Picked by 7wData.

This tool

GX Core

Pricing
GX Core is free under the Developer plan. Team and Enterprise plans offer advanced features like cloud dashboards and collaboration, with pricing available on request.
Target
GX Core is a Python library that provides a programmatic interface for building and running data validation workflows.
Strength
GX Core offers over 100 built-in Expectations, providing a wide range of verifiable assertions for common data quality checks.
Watch for
GX Core has a steep learning curve, requiring significant upfront investment in understanding Data Contexts, Data Sources, and Expectation Suites.

dbt Core

Pricing
Open source (free). dbt Cloud starts at $100/month for Developer plan.
Target
Data teams needing data transformation and testing in analytics pipelines.
Deployment
Open source Python library
Strength
Native data transformation with built-in data quality tests (singular/plural).
Watch for
Steep learning curve for non-SQL users; testing is secondary to transformation.

Apache Great Expectations (GX Core)

Pricing
Open source (free). GX Cloud starts at $15,000/year for Starter plan.
Target
Data engineers and scientists needing flexible, Python-native data validation.
Deployment
Open source Python library
Strength
Declarative, human-readable Expectations with rich built-in library.
Watch for
Complex setup for production; GX Cloud pricing can escalate with usage.

Soda Core

Pricing
Open source (free). Soda Cloud starts at $50/month per user.
Target
Data teams wanting simple, SQL-based data quality checks.
Deployment
Open source Python library
Strength
Simple YAML-based checks; strong integration with dbt and Airflow.
Watch for
Limited to SQL data sources; less flexible for non-tabular data.

User reviews

No user reviews yet. Be the first to write one.

Sources

Reporting on this tool draws on these publicly available sources.

  1. www.reddit.com
  2. www.reddit.com
  3. www.reddit.com
  4. docs.greatexpectations.io
  5. dataroots.io
  6. www.dataexpert.io
  7. greatexpectations.io
  8. greatexpectations.io