Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

ClickHouse 7 min read Announcement easyNovice

How we built an AI agent you can trust with your production tables

ClickHouse Cloud's Schema Advisor, now in Private Preview, splits schema changes into three parts. Deterministic tests over query logs produce the recommendations, an LLM drafts the migration plan, and a Temporal durable workflow executes templated SQL, so the AI never runs statements against production. Impact analysis replays a table's most frequent queries against a sampled baseline and a candidate table, either in place or in an ephemeral service restored from backup, and compares query time, rows scanned and data read. Rebuild-type changes such as ORDER BY or primary key edits use create-migrate-audit plus EXCHANGE TABLES for zero downtime, but are not yet supported for large, continuously ingesting tables or tables with materialized views.

Related posts

  • clickhouse.build: An agentic CLI to accelerate Postgres apps with ClickHouse

    ClickHouse mediumAdept

    clickhouse.build is an open source agentic CLI that adds ClickHouse to Postgres-backed TypeScript apps for analytical queries while leaving transactional work in Postgres. A scanner agent finds analytical queries in raw SQL, Prisma or Drizzle code. A data migrator then generates ClickPipes Postgres CDC API calls to sync the needed tables. A code migrator, checked by a QA sub-agent against reference codebases, rewrites queries behind a strategy pattern toggled by a USE_CLICKHOUSE feature flag. The workflow keeps a human in the loop to approve each change and aims to produce a backwards-compatible proof of concept in under an hour.

  • AI doesn’t always generate perfect ClickHouse schemas (yet)

    ClickHouse mediumAdept

    LLM-generated ClickHouse schemas tend to over-optimize from day one with custom partitioning, per-column codecs, projections and materialized views that can hurt at production scale. Five recurring pitfalls are covered: partitioning for query speed instead of data lifecycle, OPTIMIZE TABLE ... FINAL creating irreversible oversized parts that break later mutations, materialized view sprawl slowing ingestion, JSON columns misconfigured via max_dynamic_paths, and projections adding 1-2 seconds of planning latency at 5-10+ TB. The recommendation is to start with a plain MergeTree, a well-chosen ORDER BY, default compression and nothing else, then measure the real workload and add complexity only where data justifies it.

  • Manage your ClickHouse Schema-as-Code using Atlas

    ClickHouse mediumAdept

    Atlas, an open-core Database Schema-as-Code tool, now supports ClickHouse, letting engineers declare the desired schema in a SQL file and have the tool inspect the live database, diff it, and generate the DDL migration plan automatically. Unlike ORM-level migration generators such as Django's, which are tied to one stack and only cover tables, columns and indexes, this declarative approach works generically and can manage objects like views and materialized views. A walkthrough runs ClickHouse in Docker, applies a MergeTree table with `atlas schema apply` using a dev database URL, confirms the schema is synced, and then adds a column, which Atlas turns into an ALTER TABLE statement.

  • An API to Track Database Schema Changes

    Neon mediumAdept

    Neon's Schema Diff feature now has a `compare_schema` API endpoint, available on all plans, that takes two Neon branch IDs and returns a unified diff of their Postgres schemas. The goal is to let AI agents such as Replit Agent and CI/CD pipelines check schema differences programmatically. Optional LSN or timestamp parameters pin a branch to a point in time, but the two are mutually exclusive. The suggested workflow is to apply schema changes on a branch holding a copy of production data, use the API to track discrepancies, then run the migration in production once it has been tested.

  • How Suprema Gaming made its data platform agent-ready with ClickHouse Cloud

    ClickHouse mediumAdept

    Suprema Gaming moved its analytics warehouse from Snowflake to ClickHouse Cloud so that AI agents could query fresh, governed data directly. Ingestion now uses ClickPipes CDC and Debezium/Kafka in place of S3/Snowpipe batches, and dbt deployed via GitHub Actions defines layered transformations with no external orchestrator. Data freshness went from four hours to a p95 lag of about one minute, mart reads got 27x faster, and warehouse spend fell roughly 62%. Metrics were validated to the cent through an agent-assisted loop that captures each rule as a dbt test, and a fleet of 10 specialized agents with version-controlled skills, traced in Langfuse, serves business users.

The quest for software engineering knowledge.

Look:
Layout: