hypequery documentation
The analytics layer for ClickHouse, in your codebase. Define metrics once in TypeScript or Python and serve them to dashboards, APIs, and AI agents.
hypequery is an open-source semantic layer for ClickHouse that runs inside your application. You define datasets once: the dimensions people group by, the measures they aggregate, the relationships between tables, and the tenant rules that keep each customer to their own rows. Every consumer then queries those definitions by name, so a number means the same thing in a dashboard, an API response, and an AI agent's answer.
It is a library, not another service to deploy. TypeScript and Python implement the same specifications and pass the same conformance fixtures, so equivalent definitions produce the same semantic and deployment artifacts in either language.
Choose your language
TypeScript
The full toolkit: datasets, a type-safe query builder, Serve APIs for Node, Next.js, Bun, Deno and Workers, typed React hooks, the MCP server, and the CLI.
Python (beta)
Datasets and Serve for FastAPI, Django, Flask, or any ASGI or WSGI server, typed DataFrames, and the CLI. The same React hooks and MCP server work against it.
Cloud (not live yet)
A planned hosted service that serves your datasets as REST and MCP endpoints. You can't sign up yet; join the waitlist.
How the pieces fit
- Define datasets in code, next to your application, and review them in pull requests like any other change.
- Query them in-process from jobs, reports, notebooks, and your own routes, scoped to a tenant.
- Serve them over HTTP when another consumer needs them: authenticated endpoints with OpenAPI, mounted in the framework you already run.
- Connect clients to those endpoints: typed React hooks for dashboards and the MCP server for agents. Both work whether the backend is TypeScript or Python.