pypi / elasticsearch-dbapi
elasticsearch-dbapi
What changed in elasticsearch-dbapi 0.2 to 0.3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-25.
12 breaking1 performance8 behavior and defaults6 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initelasticsearch-dbapi 0.326 changes
Breaking changes 12
Reflected byte and short fields report INTEGER, half_float reports FLOAT, scaled_float reports DOUBLE, and unsigned_long reports LONG.
Queries that may return truncated unpaged results now raise DataError instead of silently returning partial rows or groups.
Client exceptions are mapped to DB-API exceptions from es.exceptions; original Elasticsearch or OpenSearch exceptions are chained as __cause__.
Reflected
double,float,half_float, andscaled_floatcolumns use Float and Python float instead of Numeric and Decimal.Grouped top-N queries ordered by aggregates are checked against the bucket ceiling and raise DataError when results may be incomplete; safe listings incur an additional SQL request.
An explicit LIMIT on a v2 plain SELECT bypasses
plugins.query.size_limit; limits above 10000 use SQL cursors and raise DataError if cursors are unavailable.Grouped-field ordering with OFFSET is probed and raises DataError at the bucket ceiling rather than silently returning incomplete results.
Open Distro plain SELECTs now return every row by requesting a search-window-sized result and paging with the SQL cursor when needed; unavailable cursors beyond 10000 rows raise DataError.
Full result sets are now fetched and held in memory. Add a LIMIT when querying large indices.
A subquery returning more than 10000 rows raises DataError because the SQL plugin cannot page it; narrow the subquery or use a physical dataset.
Supported SQL temporal values are returned as datetime, date, or time objects instead of strings; timezone-aware Elasticsearch values are normalized to UTC.
v2=falsenow disables v2 mode and keeps the legacy engine, rather than switching v2 mode on.
Performance 1
SQL compilation caching is enabled.
Behavior and default changes 7
Boolean URL arguments accept true/1/yes/on and false/0/no/off.
has_tablereturns true for aliases.OpenSearch 1.x v2 plain SELECTs remain on the v2 engine to preserve floating values and timestamp objects; version discovery is best effort and cached.
The OpenSearch dialect supports OpenSearch 3, including its default SQL endpoint and unqualified single-table columns.
Table and view listing and the OpenSearch SELECT 1 ping work without cluster privileges.
The default OpenSearch SQL endpoint is
_plugins/_sql; the driver falls back once to_opendistro/_sqlwhen the endpoint is missing. An explicit setting is not replaced.The OpenSearch dialect ignores and drops
time_zone; the SQL plugin returns UTC. Remove the URL argument to silence the warning and convert to local time in the application.
Fixes and other changes 6
Elasticsearch and OpenSearch plain SELECT results are fetched across pages instead of being cut off at the first
fetch_sizepage.LIMIT queries on a v2 connection stay on v2, preserving its functions and timestamp result types instead of taking the legacy path.
Reflected fields report their corresponding SQL types, including DOUBLE, FLOAT, INTEGER, LONG, and BOOLEAN, rather than a generic LONG or FLOAT.
server_version_infois populated from the cluster.Statements over subqueries now apply outer filters and limits correctly; subqueries receive an explicit search-window LIMIT and run on v2.
The legacy engine no longer confuses a table-qualified column with a select-list alias of the same name; aliases are renamed in the sent statement and restored in results.
elasticsearch-dbapi 0.21 changes
Behavior and default changes 1
OpenSearch queries now support removing default from the query.