github fivetran/great_expectations 1.23.2

2 hours ago

Compatibility: sqlalchemy now <2.1 (extras snowflake, databricks)

Highlights

  • Fixes GX on SQLAlchemy 2.1 — SQLAlchemy 2.1.0, released 2026-09-24, broke GX 1.23.1 and earlier on Python 3.11+, where every SQL extra resolves it by default. Depending on the backend, import great_expectations failed whenever snowflake-sqlalchemy was installed, every Databricks query failed, driverless postgresql:// URLs could not load a driver, BigQuery queries comparing against a float failed, SQL Server reported mixed-case and upper-case tables as missing, and expect_column_values_to_be_of_type(type_="Numeric") failed on float columns. 1.23.2 fixes all of these: the snowflake and databricks extras stay below SQLAlchemy 2.1 until their dialects support it, and every other SQL extra runs on 2.1. Python 3.10 is unaffected, since SQLAlchemy 2.1 requires Python 3.11. If you can't upgrade yet, pin sqlalchemy<2.1; do the same if you install snowflake-sqlalchemy or databricks-sqlalchemy outside GX's extras. (#12269)

    pip install --upgrade 'great_expectations[snowflake]'  # include your extras so the SQLAlchemy cap applies
  • Regex Expectations work on ClickHouse — The four regex Expectations now run on ClickHouse, which does not support regexp_like(). ClickHouse is covered by integration tests for these Expectations. (#12222)

    gx.expectations.ExpectColumnValuesToMatchRegex(column="name", regex="^A")
  • Correct substring matching for regex Expectations on Snowflake — Snowflake's REGEXP operator anchors patterns to the whole value, so unanchored patterns behaved differently there than on other backends. Regex Expectations on Snowflake now use substring semantics that match every other GX backend, while preserving the user's pattern. (#12221)

    gx.expectations.ExpectColumnValuesToMatchRegex(column="name", regex="ell")
  • Nested struct columns supported in Spark value-counts Expectations — On the Spark engine, Expectations that rely on the column.value_counts metric — including ExpectColumnMostCommonValueToBeInSet and ExpectColumnKLDivergenceToBeLessThan — now work for dotted nested struct paths such as address.city, instead of returning an empty result with an unresolved-column error. (#12231)

    gx.expectations.ExpectColumnMostCommonValueToBeInSet(column="address.city", value_set=["Springfield"])

Changes

Bug fixes
  • GX works on SQLAlchemy 2.1, which broke 1.23.1 on several backends: the snowflake and databricks extras are capped below 2.1, a broken snowflake-sqlalchemy install no longer prevents import great_expectations, driverless postgresql:// URLs fall back to psycopg2 when psycopg is unavailable, BigQuery renders Double as FLOAT64, SQL Server reflects mixed-case tables, the Numeric type name matches float columns again, and database URL masking keeps the database and query string verbatim. (#12269)
  • Validation results containing an infinite Decimal value — for example the maximum, mean or sum of a PostgreSQL numeric column or a pandas column of Decimal values — now serialize as float infinity instead of raising decimal.InvalidOperation. (#12254)
  • Regex Expectations on Snowflake now match substrings, consistent with other backends, rather than requiring the pattern to match the entire column value. (#12221)
  • UnexpectedRowsExpectation no longer misreads a query as containing a JOIN when the letters appear inside a string literal, a column name such as join_date, a quoted identifier or a comment; such queries are aliased correctly again and no longer fail with a syntax error on MySQL and SQL Server. (#12249)
  • Building validators on multiple threads no longer serializes or deadlocks on Python 3.10 and 3.11: concurrent validator construction now proceeds independently per instance while still building each validator only once. (#12232)
  • Regex Expectations now work on ClickHouse, which lacks regexp_like(); other SQL dialects are unchanged. (#12222)
  • Type Expectations on ClickHouse now compare and report the underlying SQL type for nullable columns instead of the Nullable(T) wrapper, so ExpectColumnValuesToBeOfType and ExpectColumnValuesToBeInTypeList behave as expected. (#12219)
  • The Spark column.value_counts metric now resolves nested struct columns such as address.city, so Expectations built on it return results instead of an unresolved-column error. (#12231)
Docs
  • The changelog entries for releases 1.0.0 through 1.17.0 are rewritten in the structured format, and the previously missing 1.13.1 release now has its own entry. (#12227)
  • The changelog entries for releases 1.17.1 through 1.23.0 are rewritten in the structured format, and the deprecation timeline gains rows for the gx-redshift extra alias and for CloudDataContext / cloud mode of get_context. (#12225)
Maintenance
  • Redshift CI jobs are capped to three concurrent runs against the shared cluster, and test teardown now drops every test schema with retries so failed runs no longer leak schemas. No user-visible change. (#12257)

Contributors

Thanks to @adimalkar, @Rayan-and-beyond (first contribution), @nanjeshramesh, @feiiiiii5, @alibro005, @pentaoa (first contribution).

Don't miss a new great_expectations release

NewReleases is sending notifications on new releases.