Oracle Support #12090
joshua-stauffer
started this conversation in
Request For Comment
Oracle Support
#12090
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Problem
Oracle has been a community ask since 2018 (#393), and GX has carried partial Oracle support since April 2021 (#2609), but today that support is inconsistent. It's untested in CI, doesn't have an official install path, and is broken in significant places against enterprise deployments. This RFC proposes to close that gap.
Community Need
At the GX community meetup on August 20th, 2026, @AlmeidaJoao raised that significant parts of GX functionality are broken against enterprise Oracle, most notably that daily or monthly BatchDefinitions are unusable. They aren’t the first to raise this gap; Oracle support is a consistent community ask.
Live demand, current API
Oracle-specific bug reports
Modernization
Pre-v1 tail
GX Cloud (obsolete)
Current State
Oracle-specific code paths exist in GX, but there is no registered
SqlDatasourceTestConfig, no CI lane, and no requirements file. At the public API surface, there’s noadd_oraclefluent data source method, and no extra installpip install great_expectations[oracle].The Implementation Gap
PR #12085 adds Oracle to the tiered suite. Six of the eight case groups pass today, and the following two fail:
Gap 1: Regex expectations raise NotImplementedError due to a missing dialect branch. Function get_dialect_regex_expression in expectations/metrics/util.py is a chain of per-dialect branches ending in return None; Oracle takes the fallthrough, and the caller raises NotImplementedError, surfaced as a MetricResolutionError. The failure masquerades as a data-quality finding: success is False and the real error is buried in exception_info. Fix is additive — an Oracle branch rendering REGEXP_LIKE, plus the negated sibling.
Gap 2: Query-metric expectations fail with ORA-00933/00907 — hardcoded AS on a derived table. The query-metric providers string-format f"({selectable}) AS subselect" / AS substituted_batch_subquery; Oracle's grammar accepts AS before a column alias but rejects it before a table alias. Isolated to the grammar rule with a two-line raw oracledb probe (... AS subselect → ORA-00933; same query without AS → succeeds). This blocks UnexpectedRowsExpectation and everything routing through _get_substituted_batch_subquery_from_query_and_batch_selectable. To fix this we render the alias without AS when compiling for Oracle.
Since the natural workaround for Gap 1 is an
UnexpectedRowsExpectationblocked by Gap 2, there is currently no working regex path on Oracle at all.A spike revealed two further failures outside of the tiered test suite. The partitioner failure (Gap 3) is a blocker for this work; the sampler failure (Gap 4) can be deferred, since sampling isn’t exposed through the BatchDefinition API.
Gap 3: As reported by @AlmeidaJoao, monthly/daily date partitioning fails with ORA-00906 — unlengthed VARCHAR2 cast. The multi-date-part branch of SqlAlchemyDataPartitioner casts each extracted part to sa.String with no length; SQLAlchemy's Oracle dialect compiles that to bare VARCHAR2, which Oracle rejects inside CAST. BatchDefinitions created with add_batch_definition_monthly/_daily fail, while add_batch_definition_yearly works. The fix is an explicit length (VARCHAR2(4000)) or TO_CHAR.
Gap 4: The MD5 sampler emits three constructs Oracle doesn't have — RIGHT (ORA-00904), MD5 (ORA-00904), and CAST AS CLOB (ORA-00932), all three independently invalid, so any fix needs all of them (SUBSTR/STANDARD_HASH/TO_CLOB) or an explicit unsupported guard. This is probably a broader problem across data sources, and isn’t necessarily specific to Oracle.
Proposed change
This RFC proposes to bring Oracle under test in CI, fix the implementation gaps that keep Oracle from passing the suite, and ship Oracle as a supported extra dependency
pip install great_expectations[oracle], which installsoracledb.Under this proposal, Oracle enters the curated sql tier (i.e. it’s used via the generic
add_sqlAPI, noadd_oraclepublic API method), and CI runs against an Oracle 21c image, which is the oldest freely containerizable XE image.Release Requirements
GX will not ship an
[oracle]extra until these requirements are met:Impact on public API or architecture
This proposal adds one public install surface: the
pip install great_expectations[oracle]extra, which installsoracledb. There is deliberately noadd_oraclefluent data source method — Oracle enters the curated sql tier and is used via the genericadd_sqlAPI, so no new public API methods are introduced. No existing public API changes.oracledbis the only supported driver — there is no attempt atcx_Oraclecompatibility. Regression risk to other backends is low: each gap fix is dialect-gated, following the existing per-dialect branching pattern (as inget_dialect_regex_expression), so rendered SQL for existing backends is unchanged. CI verifies Oracle 21c; 19c compatibility is expected but not CI-verified.Alternatives considered
A dedicated
add_oraclefluent method. Oracle is instead used via the genericadd_sqlAPI, consistent with the other data sources in the curated sql tier; a dedicated fluent method can still be added later, without breaking changes, if demand warrants it.CI against 23ai instead of 21c. 21c is chosen over 23ai so that the tested surface stays close to the 19c still common in enterprise deployments. 19c compatibility is expected but not CI-verified.
Fixing the MD5 sampler now (Gap 4). Gap 4 is deferred rather than fixed here: sampling isn’t exposed through the BatchDefinition API, and the failure is probably a broader problem across data sources rather than something Oracle-specific.
RFC Process Notes
This is the first published RFC after the contributor docs rewrite in July 2026, and helps to establish the intended pattern. The weight of an RFC scales with how open its design questions are; this is a low-complexity example. RFCs should generally be approved prior to implementation. This RFC posts concurrently with its implementation, due to the following circumstances:
Per the documented convention in CONTRIBUTORS.md, the comment window stays open for the full two-week minimum, and the public API change (#12091) will be held until the window closes.
All reactions