github ClickHouse/clickhouse-connect v1.1.0a1

pre-release6 hours ago

1.1.0a1 — Alpha Preview (Alembic Integration)

This is an alpha preview of the upcoming 1.1.0 release, published from the joe/alembic-integration-work branch for early testing of the new SQLAlchemy and Alembic features. It includes everything in 1.0.0rc2 plus the additions listed below.

Installation

Pre-releases are not installed by default. Pin the exact version:

pip install clickhouse-connect==1.1.0a1

# To use the new Alembic integration:
pip install "clickhouse-connect[alembic]==1.1.0a1"

What's new in this preview

  • Alembic migration support: Full Alembic integration for ClickHouse schema migrations: autogeneration from SQLAlchemy metadata, upgrade/downgrade lifecycle, and round-tripping of ClickHouse-specific DDL. Engines (MergeTree, ReplacingMergeTree, etc.) and Dictionaries are preserved through the migration lifecycle. Supported operations include create/drop table, add/alter/drop/rename column, type and nullability changes, defaults, comments, IF EXISTS guards, column placement with AFTER, and operation-level clickhouse_settings. See WORKED_EXAMPLE.md for an end-to-end walkthrough.
  • ClickHouse Dictionary type support in SQLAlchemy and Alembic.
  • New SQLAlchemy chainables: PREWHERE, LIMIT BY, and lambda expressions as Select constructs for ClickHouse-specific query shapes.
  • Multi-column ARRAY JOIN label preservation — aliases now survive through compilation, fixing label loss with parallel array expansion.
  • Migration shim for clickhouse-sqlalchemy users — new cc_sqlalchemy.types and cc_sqlalchemy.engines import-compatible modules. See MIGRATING_FROM_CLICKHOUSE_SQLALCHEMY.md.
  • SQLAlchemy 1.4 and 2.x compatibility improvements across the dialect and DDL compiler paths.
  • Inspector: cloud quirk reflection fixes for ClickHouse Cloud-specific schema reflection edge cases.
  • DDL compiler: better handling of nested container types and Tuple adaptation.
  • Alembic autogenerated migrations rendering enum types (including nested container types) with the correct ClickHouse-compatible representation.

Feedback

This alpha exists to shake out the new SQLAlchemy/Alembic surface before it ships in 1.1.0 final. Please file issues at https://github.com/ClickHouse/clickhouse-connect/issues with the alembic or sqlalchemy label so they're easy to triage.

Full changelog

See CHANGELOG.md for the complete entry, plus everything inherited from 1.0.0rc2.

Don't miss a new clickhouse-connect release

NewReleases is sending notifications on new releases.