Registry /
data / acryl-great-expectations
Install & Compatibility
Where this runs
tested against v0.15.50.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 11.496s · 626.5MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 31.7s · import 9.996s · 597MB
625MB installed
● package 625MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
PandasDataset
✓ from great_expectations.dataset import PandasDataset
Commonly used for in-memory data validation with Pandas DataFrames in V2 API.
ExpectationSuite
✓ from great_expectations.core.expectation_suite import ExpectationSuite
For programmatic creation and management of expectation suites in V2 API.
DataContext
✓ from great_expectations.data_context import DataContext
✗ from great_expectations.data_context.data_context import DataContext
While the explicit path works, the top-level import is more common. Avoid V3 `DataContext.get_context()` calls.
This quickstart demonstrates basic data validation using Great Expectations' V2 API, which `acryl-great-expectations` provides. It uses an in-memory Pandas DataFrame to create a `PandasDataset`, adds a few common expectations, and runs a validation.
import pandas as pd
from great_expectations.dataset import PandasDataset
from great_expectations.core.batch_spec import BatchSpec
# Sample data
df = pd.DataFrame({
"id": [1, 2, 3, 4, 5],
"value": [10, 20, 30, 40, 50],
"category": ["A", "B", "A", "C", "B"]
})
# Create a PandasDataset (V2 API style for in-memory validation)
batch = PandasDataset(df, batch_spec=BatchSpec(data_asset_name="my_dataframe"))
# Define and add expectations
batch.expect_column_to_exist("id")
batch.expect_column_values_to_be_between("value", min_value=0, max_value=100)
batch.expect_column_distinct_values_to_be_in_set("category", ["A", "B", "C"])
# Validate the batch
validation_result = batch.validate()
print(f"Validation successful: {validation_result.success}")
if not validation_result.success:
print("Validation failed details:")
for result in validation_result.results:
if not result.success:
print(f" Expectation: {result.expectation_config.expectation_type}, Status: {result.success}")
# Expected output: Validation successful: True
great_expectations --version
Debug
Known issues
breaking`acryl-great-expectations` explicitly pins its `great-expectations` dependency to versions `<0.16.0`. This means it *only* supports the legacy V2 API of Great Expectations, which is fundamentally incompatible with the V3 API introduced in `great-expectations>=0.17.0`.fixEnsure all Great Expectations code and configuration used with `acryl-great-expectations` adheres to the V2 API patterns. Do not attempt to use V3-specific classes, methods, or configuration formats (e.g., `DataContext.get_context()` or V3 YML schema).
affects: 0.15.50.1 (and all other versions of acryl-great-expectations)
gotchaConfiguration files (e.g., `great_expectations.yml`) generated or modified for the V3 Great Expectations API will cause parsing errors or unexpected behavior when used with `acryl-great-expectations` due to its V2 API dependency. The structure and available parameters differ significantly.fixAlways refer to V2 API documentation for `great_expectations.yml` structure and best practices when working with `acryl-great-expectations`.
affects: All versions
gotchaThe primary intent of `acryl-great-expectations` is to provide Great Expectations functionality specifically for DataHub integrations. While it can be used standalone, users new to Great Expectations might find clearer guidance and more up-to-date examples using the main `great-expectations` library (which supports V3 API).fixIf not explicitly integrating with DataHub, consider using the main `pip install great-expectations` package to access the latest features and documentation (V3 API).
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'great_expectations.data_context.data_context'
Attempting to import `DataContext` from a V3-specific path, which might not be directly available or work as expected with the V2 API.
fixUse `from great_expectations.data_context import DataContext` (V2 common import) or confirm V2-compatible paths.
AttributeError: 'DataContext' object has no attribute 'get_context'
Attempting to use the V3 API method `DataContext.get_context()` with a DataContext instance from the V2 API, which lacks this method.
fixInstantiate the `DataContext` directly via its constructor (e.g., `DataContext('/path/to/project')`) as per V2 API documentation. great_expectations.exceptions.exceptions.InvalidConfigurationBundleError: The great_expectations.yml file in /path/to/great_expectations is not valid. The following errors were found:
- ... (schema validation errors related to V3 fields)
Using a `great_expectations.yml` file formatted for the V3 API with `acryl-great-expectations`, which expects the V2 configuration schema.
fixRevert to a `great_expectations.yml` configuration adhering to the V2 API schema, or manually adjust the file to remove V3-specific elements like `fluent_datasources`.
Upgrade
Version history
0.15.50.1latest on PyPI · released May 2, 2025
Audit
Dependencies
great-expectationsrequiredProvides core data validation functionality; acryl-great-expectations pins it to versions <0.16.0, mandating the use of the V2 API.
Resources
No resource links recorded.