expect_column_values_to_match_strftime_format fails silently (empty result) on sql execution engines: missing provider is reported as a data failure
describe the bug
expect_column_values_to_match_strftime_format has metric providers registered for PandasExecutionEngine and SparkDFExecutionEngine only. on any sqlalchemy/sqlite execution engine the missing provider is caught and converted into a failed validation with an empty result, instead of surfacing "expectation not supported on this engine".
the practical failure mode: the same suite runs green on pandas and "fails" on sql engines with zero unexpected values and no diagnostics in the standard fields, which reads as a data problem rather than a coverage gap. pipelines branching on success see a false data incident.
reproducer (gx 1.23.0, current main):
import pandas as pd, sqlite3, great_expectations as gx, tempfile, pathlib
df = pd.DataFrame({"d": ["2026-01-01", "2026-06-15", "1999-01-01", None, "2026-03-01"]})
tmp = pathlib.Path(tempfile.mkdtemp()) / "ge.db"
con = sqlite3.connect(tmp)
df.to_sql("t", con, index=False)
con.close()
ctx = gx.get_context()
ds = ctx.data_sources.add_sqlite(name="ds", connection_string=f"sqlite:///{tmp}")
asset = ds.add_table_asset(name="t", table_name="t")
batch = asset.get_batch(batch_request=asset.build_batch_request())
r = batch.validate(
ExpectColumnValuesToMatchStrftimeFormat(column="d", strftime_format="%Y-%m-%d")
)
r.success # False on sqlite, True on pandas for the same data
r.result # {} (no unexpected_count, no partial_unexpected_list)
r.exception_info # raised_exception=True, "No provider found for column_values.match_strftime_format.un..."pandas path for the same frame: success=True, unexpected_count=0.
the mechanism: _registered_metrics["column_values.match_strftime_format.unexpected_count"]["providers"] keys are ['PandasExecutionEngine', 'SparkDFExecutionEngine']; get_metric_provider walks the engine mro, finds nothing, raises MetricProviderError, and the validator's default catch converts it to a failed result (validator.py catch_exceptions defaults on in the resolution path).
expected behavior
two separable problems, either would help:
- the coverage gap itself: no sqlalchemy provider for the strftime expectation (and possibly others in the pandas/spark-only set)
- the reporting: an unimplementable expectation should surface as "unsupported on this engine" loudly (raise, or a distinct result status), not as a plain validation failure. right now the only trace is buried in
exception_info
happy to attempt a sqlalchemy provider or the explicit-unsupported path if maintainers want either.
Source: fivetran/great_expectations