Repository navigation
duckdb-sqlalchemy 1.5.6.3
Highlights
- STRUCT fields honor declared SQLAlchemy conversions, preventing skipped decorators, Enum insertion errors and incorrect Decimal storage. #201
- MotherDuck settings and helper columns follow the installed extension's supported behavior, fixing ignored server-side temporary-table settings and binder errors. #200
Features
- Set a MotherDuck connect timeout with
connection_timeout, for exampleduckdb:///md:analytics?connection_timeout=30sorcreate_motherduck_engine(..., connection_timeout=timedelta(seconds=30)). It moves into themd:database string, where the MotherDuck extension for DuckDB 1.5.6 reads it. Before, the key reached DuckDB as an unknown config option.motherduck_connection_timeoutis accepted too. See Connection timeout. #200 - Pass
datetime.timedeltafor the MotherDuck interval parametersconnection_timeoutanddbinstance_inactivity_ttl, and for settings the dialect applies withSET, in URL helpers orconnect_args["config"]. Values render as DuckDB interval strings such as30sor1500ms. #200
Bug Fixes
- Apply declared SQLAlchemy bind and result processors to STRUCT fields, including nested STRUCT, LIST, fixed ARRAY and MAP members. Field decorators, Enum and JSON conversion now run, and positive-exponent Decimal values retain their magnitude in ordinary and pandas-fallback inserts. Existing rows are not rewritten. #201
motherduck_enable_server_side_temp_tables=Truenow enables server-side temporary tables. Before, the dialect put it in themd:database string, which the MotherDuck extension ignores, so temporary tables stayed local. The dialect now runsSET motherduck_enable_server_side_temp_tableson each new connection. #200- The MotherDuck table-function helpers select only the columns that the extension for your DuckDB version returns. Before, several default queries failed with a binder error: #200
md_list_flight_versions()andmd_job_versions()on DuckDB 1.5.5 and newer, which no longer returnsource_codeandrequirements_txt.md_update_dive_metadata()andmd_update_dive_status()on every version, which never returnrequired_resources.md_get_dive()andmd_create_dive(), which do not returnrequired_resources.- Flight version helpers on DuckDB 1.5.3 (no
max_runtime_sec),md_get_flight_logs()on DuckDB 1.5.3 and 1.5.4 (a singlelogscolumn), and Dive helpers before DuckDB 1.5.4 (no status columns).
- The helpers also return the newer columns:
owner_namefrom the Flight summary helpers on DuckDB 1.5.5 and newer, andinstance_typefrom the Flight version helpers on DuckDB 1.5.6. See Columns by DuckDB version. #200
Tooling and Release
- Publish the next maintenance version on the 1.5.6 line through the checked build, PyPI hash-verification and fresh-install workflow. Release diff
Compatibility
- Accessing a column that the installed extension does not return, for example
md_list_flight_versions().c.source_codeon DuckDB 1.5.5, now raisesAttributeErrorwhen you build the statement instead of a binder error when it runs. Read source columns withmd_get_flight_version(), or passcolumns=to name columns yourself. #200 motherduck_enable_server_side_temp_tablesis no longer part of themd:database string, so it no longer changes the client instance cache key. #200- STRUCT field
TypeDecorator, Enum, JSON and Numeric Python hooks now run recursively. Existing rows are not rewritten, so review stored values if your application compensated for skipped conversion. Dependency floors and cache identity are unchanged. #201
Verification
- Nine new STRUCT execution cases pass, including eight regressions demonstrated on unchanged main. The locked full suite passed 707 tests, with minimum-version and SQLAlchemy 2.1 checks, remote datatype tests, lint, types, strict distributions and fresh wheel smokes. Hosted stable, optional-floor, platform and distribution gates passed. #201
- MotherDuck settings readback and helper binding across client versions are documented with the included compatibility fixes. #200
Full diff: v1.5.6.2...v1.5.6.3