hypequery (@hypequery) profile picture

The analytics layer for ClickHouse

Valencia, Spain
Joined March 2025
you can now stream @ClickHouseDB results as Arrow with hypequery 🏎️ analytics.streamArrow(Orders, query) Same dataset, same tenant scoping.
10
Also new in hypequery datasets: - minute and hour time grains - measure.approxCountDistinct: ClickHouse uniq, bounded memory, marked approximate in catalogs so UIs and agents can say so - an execution timezone per query
8
npx hypequery skill install Skills for your agent to build and use your hypequery semantic layer on @ClickHouseDB
9
Segments: named row filters defined once on a dataset and selected by name, like enterprise or large. They can use dimensions callers can't filter on, and catalogs (what an MCP agent sees) list names, never conditions. hypequery.com/docs/datasets/…
6
Dataset queries accept having on aggregated measures, e.g. only groups where revenue is over 10,000. Values are bound as parameters and applied after grouping, before ordering and limits. Works through Serve, MCP and the React hooks too.
9
Trailing, to-date and running totals are dataset measures now: measure.trailing for a 7-day window, measure.toDate for month-to-date, measure.cumulative for a running total.
6
Period-over-period without hand-written joins: measure.shift turns revenue into last year's revenue in one line. Shifted measures share the query's filters, tenant scope and gap filling, and work in derived formulas like YoY growth. hypequery.com/docs/datasets/…
5
@hypequery 🤝 @chdb_io Build your analytics API locally on embedded ClickHouse, then ship it to a real cluster by swapping one line. pip install "hypequery[server,chdb]" hypequery init --database chdb my-app hypequery.com/docs/python/da…
1
1
2
102
One Python dataset definition can now drive an authorized HTTP API, generated React types, and MCP for agents. The beta's tutorial walks the whole path: Python, then generated React client, then HTTP MCP, with tenant-scoped ClickHouse serving.
1
1
38
hypequery for Python is in beta: a semantic layer for ClickHouse datasets, metrics and multi-tenant analytics, served with FastAPI. ```bash pip install "hypequery[fastapi,clickhouse]" ``` pypi.org/project/hypequery/
1
17
@hypequery/clickhouse passed 20,000 weekly npm downloads: 23,588 for 20-26 Oct. Thanks to everyone using it, filing issues, and telling us where the types were wrong.
1
20
Dataset relationships can join on composite keys now, e.g. tenant + account. All key pairs compile into one ANY LEFT JOIN, so a to-one join can't fan out rows and inflate your sums. The query builder gained the same key-pair form for innerJoin, leftJoin and friends.
10
ReplacingMergeTree keeps old row versions until a merge runs, so a plain SUM can count a row twice. One line covers every query and join that reads the dataset: ```ts rowResolution: { kind: 'final', engine: 'replacing', deletedColumn: 'is_deleted' }, ```
10
Datasets now read AggregatingMergeTree state columns directly: ```ts activeUsers: measure.merge('uniq', 'users'), // uniqMerge(users) ``` Trailing windows merge states across buckets, so a 7-day distinct count comes from merged daily states, not summed daily counts.
13
An order is created, shipped, then delivered. hypequery datasets can now declare several time axes and pick one per query: ```ts timeKey: "createdAt", timeKeys: ["shippedAt"], ``` A typo in the query's timeKey is a compile error. hypequery.com/docs/datasets/…
12
Instacart's ClickHouse sorting key: ORDER BY (shopper_id, created_at_ts) Not: ORDER BY (created_at_ts, shopper_id) Column order determines whether you scan millions of rows or thousands. Explaining this to every analyst doesn't scale. That's why abstraction layers exist.
48
ClickHouse SQL isn't the hard part. The hard part is that every optimisation that makes ClickHouse fast also makes it harder to query directly. - Array-based storage (Uber) - AST-based query optimization (Contentsquare) - Sorting key design (Instacart)
1
57
That's why 7 companies built abstraction layers independently. Same pattern. No coordination. hypequery.com/blog/2026-01-0…
18