ClickHouse Semantic Layer

A semantic-layer alternative for ClickHouse, with honest limits

Some teams searching for a ClickHouse semantic layer do not actually need a full metrics platform on day one. They need reusable named queries, typed inputs and outputs, safer delivery paths, and one reviewed contract per metric. hypequery does that well today. It is not a full semantic layer, and semantic-analysis capabilities are on the roadmap rather than already shipped.

What hypequery is

Typed query-contract layer

What it is not

Full semantic metrics platform

Best fit

Product and app teams on ClickHouse

Raw ClickHouse queries do not become a governed metrics layer by themselves

Even when the SQL is correct, metrics drift once the same idea is repeated across dashboards, APIs, exports, and internal tools. Teams need named contracts, not more scattered query strings.

Full semantic layers can be heavier than what product teams need first

Tools like Cube are strong when you need central metrics for BI tools, multiple external consumers, caching, and pre-aggregations. Many ClickHouse teams are earlier than that and mainly need governed reuse inside a TypeScript application stack.

The term "semantic layer" covers several different needs

Sometimes the need is metric governance. Sometimes it is type-safe delivery into apps. Sometimes it is AI-safe query exposure. Those overlap, but they are not the same product surface.

What hypequery does today

Reusable typed query contracts that travel across your stack

hypequery lets you define named ClickHouse queries in TypeScript, validate inputs, infer outputs from the schema, and reuse the same contract across local execution, HTTP endpoints, React hooks, and agent-facing surfaces. That covers an important part of the semantic-layer problem: governed reuse.

  • Schema-generated types from your live ClickHouse database
  • Named query definitions instead of anonymous SQL fragments
  • Typed inputs with Zod and typed outputs from the query result
  • One contract reused across services, dashboards, and app features
  • A clean path to HTTP, OpenAPI, React, and MCP-style consumers
  • No claim of full semantic modeling, metric compiler rules, or BI-wide governance today

Named contract

Define a metric-like query once

what-hypequery-does-today.ts

This is the part hypequery does well today: define a query contract once, type it from the real schema, and make it reusable across consumers.

Where the boundary is

Use hypequery for governed reuse, and reach for Cube when you need a full semantic platform

The honest line is simple. If you need centralized metrics serving many BI and non-engineering consumers, pre-aggregations, and a dedicated semantic platform, evaluate Cube. If you need reusable query contracts inside a ClickHouse-heavy TypeScript product, hypequery is a lighter fit.

A lot of teams searching for "ClickHouse semantic layer" are really trying to stop duplicating query logic across codepaths. hypequery addresses that directly by making queries first-class, typed, and transportable.

If semantic analysis, richer metric semantics, or more explicit modeling capabilities are important to your workflow, open an issue. That is a legitimate extension area for hypequery, but it should be described as roadmap work, not present-day functionality.

Reuse pattern

One definition, several delivery paths

where-the-boundary-is.ts

This is the practical payoff: the same reviewed query contract can feed server code, REST endpoints, dashboards, and agent workflows without being re-authored in each place.

Why teams search for this

Common implementation questions this page should solve

ClickHouse semantic layer

If you want a ClickHouse semantic layer, first decide whether you need a full metrics platform or a reusable application-layer contract for queries and metrics.

Cube.js alternative for ClickHouse apps

Cube is a stronger fit for centralized semantic serving across many consumers. hypequery is the lighter code-first option when your main need is governed query reuse inside a TypeScript stack.

Reusable metrics on ClickHouse

Reusable metrics start with named contracts, typed inputs, and consistent delivery paths. That is the part hypequery solves directly today.

Semantic layer roadmap for hypequery

hypequery is not claiming full semantic-layer functionality today. If that is the missing piece for your use case, the right move is to raise it directly as a roadmap request.

Next step

Decide whether you need a query-contract layer or a full semantic platform

If governed query reuse inside your app is the main problem, start with the analytics layer. If you need deeper semantic capabilities, compare Cube and tell us what hypequery would need to support your workflow.