Skip to content

duckdb-sqlalchemy 1.5.6.3

Choose a tag to compare

@github-actions github-actions released this 16 Oct 09:23
e28d0c5

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 example duckdb:///md:analytics?connection_timeout=30s or create_motherduck_engine(..., connection_timeout=timedelta(seconds=30)). It moves into the md: 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_timeout is accepted too. See Connection timeout. #200
  • Pass datetime.timedelta for the MotherDuck interval parameters connection_timeout and dbinstance_inactivity_ttl, and for settings the dialect applies with SET, in URL helpers or connect_args["config"]. Values render as DuckDB interval strings such as 30s or 1500ms. #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=True now enables server-side temporary tables. Before, the dialect put it in the md: database string, which the MotherDuck extension ignores, so temporary tables stayed local. The dialect now runs SET motherduck_enable_server_side_temp_tables on 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() and md_job_versions() on DuckDB 1.5.5 and newer, which no longer return source_code and requirements_txt.
    • md_update_dive_metadata() and md_update_dive_status() on every version, which never return required_resources.
    • md_get_dive() and md_create_dive(), which do not return required_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 single logs column), and Dive helpers before DuckDB 1.5.4 (no status columns).
  • The helpers also return the newer columns: owner_name from the Flight summary helpers on DuckDB 1.5.5 and newer, and instance_type from 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_code on DuckDB 1.5.5, now raises AttributeError when you build the statement instead of a binder error when it runs. Read source columns with md_get_flight_version(), or pass columns= to name columns yourself. #200
  • motherduck_enable_server_side_temp_tables is no longer part of the md: 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