great_expectations
great_expectations copied to clipboard
No provider found for method using SqlAlchemyExecutionEngine for json-related expectations
Describe the bug
Using json-related expectations expect_column_values_to_match_json_schema
and expect_column_values_to_be_json_parseable
To Reproduce
Code to reproduce (raw_data col contains json data as text):
{
"expectation_type": "expect_column_values_to_be_json_parseable",
"kwargs": {
"column": "raw_data"
},
"meta": {
"notes": {
"content": "Check that column is json parseable",
"format": "markdown"
}
}
}
Full stack traceback below:
No provider found for column_values.json_parseable.unexpected_count using SqlAlchemyExecutionEngine
Show exception traceback...
Traceback (most recent call last):
File "/workspace/pisa2025-api-etl/.venv/lib/python3.10/site-packages/great_expectations/expectations/registry.py", line 304, in get_metric_provider
return metric_definition["providers"][type(execution_engine).__name__]
KeyError: 'SqlAlchemyExecutionEngine'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/workspace/pisa2025-api-etl/.venv/lib/python3.10/site-packages/great_expectations/validator/validator.py", line 1143, in _generate_metric_dependency_subgraphs_for_each_expectation_configuration
graph=self._metrics_calculator.build_metric_dependency_graph(
File "/workspace/pisa2025-api-etl/.venv/lib/python3.10/site-packages/great_expectations/validator/metrics_calculator.py", line 208, in build_metric_dependency_graph
graph.build_metric_dependency_graph(
File "/workspace/pisa2025-api-etl/.venv/lib/python3.10/site-packages/great_expectations/validator/validation_graph.py", line 130, in build_metric_dependency_graph
) = self.set_metric_configuration_default_kwargs_if_absent(
File "/workspace/pisa2025-api-etl/.venv/lib/python3.10/site-packages/great_expectations/validator/validation_graph.py", line 174, in set_metric_configuration_default_kwargs_if_absent
metric_impl_klass, metric_provider = get_metric_provider(
File "/workspace/pisa2025-api-etl/.venv/lib/python3.10/site-packages/great_expectations/expectations/registry.py", line 306, in get_metric_provider
raise gx_exceptions.MetricProviderError(
great_expectations.exceptions.exceptions.MetricProviderError: No provider found for column_values.json_parseable.unexpected_count using SqlAlchemyExecutionEngine
Expected behavior Expectations to run without error
Environment (please complete the following information):
- Operating System: Linux via Docker Desktop for Windows
- Great Expectations Version: 0.18.3
- Data Source: PostgreSQL tables
- Cloud environment: N/A (PostgreSQL db hosted on docker network)
Additional context Seems to be an issue parsing any JSON data, so not sure if it's related to my set up (but please let me know if you need more information)
@leeroyaus is sqlalchemy
installed?
By default, we don't require it when great_expectations
is installed.