Compare

Cube vs Tinybird vs hypequery: Three Ways to Put an API on ClickHouse

Cube, Tinybird, and hypequery all sit between ClickHouse and your application — but they're a platform, a managed service, and a library. Here's how to actually choose.

Updated

Decision type

Architecture and workflow fit

Audience

TypeScript teams building on ClickHouse

Outcome

Choose a path and move into implementation

Shape

Open-source library inside your app, in TypeScript or Python

Data ownership

Uses the ClickHouse you already run

TypeScript workflow

Queries and response types live in your repo, generated from your schema

What this page is for

Use this page when the real question is how one tool changes the shape of your ClickHouse application code, not just which syntax looks nicer.

What this page is not

It is not a broad ecosystem roundup. It stays narrow on the tradeoff a ClickHouse-heavy TypeScript team is actually deciding.

Recommended next move

If the tradeoff already looks clear, stop reading comparisons and test the fit against one real query in your own schema.

Dimension
hypequery
Cube and Tinybird
Shape
Open-source library inside your app, in TypeScript or Python
Cube is a semantic layer platform; Tinybird is a managed analytics backend
Data ownership
Uses the ClickHouse you already run
Cube queries your databases; Tinybird typically runs the ClickHouse platform for you
TypeScript workflow
Queries and response types live in your repo, generated from your schema
Cube and Tinybird expose platform APIs that your app consumes
Best fit
Product teams with an existing ClickHouse, in TypeScript or Python
Cube for shared BI semantics; Tinybird for zero-ops hosted analytics APIs
BI tools
Not a goal; typed application APIs instead
Cube: Postgres-compatible SQL API. Tinybird: read-only ClickHouse-compatible HTTP interface
Caching and rollups
Optional query result cache; ClickHouse materialized views
Cube: pre-aggregations in Cube Store. Tinybird: materialized views and copy pipes
Pricing
Free and open source
Cube Cloud: per developer seat, with a Free plan. Tinybird: plans sized in vCPUs, with a free plan
Agents and MCP
@hypequery/mcp over your datasets and metrics
Both ship MCP servers for their platforms

When to pick Cube or Tinybird instead

  • Pick Cube when BI tools and your app must share one set of metric definitions, across more than one database.
  • Pick Cube when expensive queries hit by many users need managed pre-aggregations.
  • Pick Tinybird when you do not run ClickHouse yet and want ingestion plus hosted API endpoints with no ops.
  • Pick Tinybird when the team is SQL-first and wants endpoints with token auth and rate limits from the platform.
Back to comparisons

Published · Updated

If you search "Cube vs Tinybird," you'll mostly find each vendor explaining why the other one is solving a different problem. Which is actually true — they are. But it's not very helpful when what you have is a ClickHouse full of data, an application that needs analytics, and a decision to make.

So here's the version with all three options on the table, including the one where you don't adopt a platform at all.

The one-sentence versions

Cube is a semantic layer platform. It sits between your databases (ClickHouse among many) and your consumers (BI tools, apps, spreadsheets), giving everyone one set of metric definitions, plus caching and pre-aggregations.

Tinybird is a managed analytics backend. Your data moves into their ClickHouse, you write SQL Pipes, and each Pipe becomes a hosted API endpoint with token auth and rate limiting handled for you.

hypequery is an open-source library for TypeScript and Python. It points at the ClickHouse you already run, generates types from your schema, and turns queries written in your repo into typed REST endpoints and React hooks.

A platform, a service, and a library. Most of the decision falls out of which of those shapes fits your team.

What each one is actually for

Cube: many consumers, one set of definitions

Cube earns its complexity when the same metrics need to reach multiple consumers — Tableau over the SQL API, an embedded dashboard over REST, a data app over GraphQL — and you need "revenue" to mean the same thing in all of them. Pre-aggregations are the other headline: for expensive queries hit by many users, Cube's caching layer does real work.

The cost is that Cube is infrastructure. There's an API server and a cache store to run (or a Cube Cloud bill), a modelling layer in YAML/JS to maintain, and a query JSON format your app speaks instead of SQL or your own types.

Tinybird: zero ops, fastest path to a hosted API

Tinybird's whole pitch is speed without infrastructure. Data streams in, SQL Pipes transform it, and endpoints appear with tokens and rate limits already sorted. For a team with no ops capacity that needs a public-facing data API this quarter, it's genuinely hard to beat.

The costs are the ones managed platforms always have: your data lives in their ClickHouse, pricing is a plan sized in vCPUs on top of anything else you run, and the workflow is SQL-first. Tinybird's TypeScript SDK, which it marks experimental, infers types from the resources you define for Tinybird, not from a ClickHouse you already run.

hypequery: your ClickHouse, your repo, your types

hypequery assumes the database part is handled — you're on ClickHouse Cloud or self-hosting — and the missing piece is everything between ClickHouse and your TypeScript code. Types are generated from the live schema (with correct runtime mappings — UInt64 comes back as a string, and your types know it). Queries are code. Endpoints come from @hypequery/serve with validation and OpenAPI docs. Dashboards use typed React hooks on the same contracts.

The cost: you run your own ClickHouse (or pay ClickHouse Cloud to), and auth, rate limiting and caching come from @hypequery/serve and the query builder running in your own app, rather than from a platform.

The table

CubeTinybirdhypequery
ShapeSemantic layer platformManaged analytics serviceOpen-source library
Your data livesIn your databasesIn Tinybird's ClickHouseIn your ClickHouse
Queries defined inYAML/JS data modelsSQL pipes in datafiles or TypeScript, deployed to TinybirdTypeScript or Python in your repo
TypeScript typesHand-written for Cube responsesInferred from Tinybird definitions (SDK marked experimental)Generated from your schema
BI tools (Tableau etc.)Yes — a core strengthNot the focusNo
Caching / pre-aggsPre-aggregations in Cube Store, a core strengthMaterialized views and copy pipesOptional result cache / ClickHouse MVs
Auth & rate limitingAuth through Cube's security contextTokens, plus JWTs with rate limitsJWT auth and rateLimit in @hypequery/serve
Ops burdenRun Cube (or pay Cube Cloud)NoneRun ClickHouse (or use Cloud)
PricingCube Core is open source; Cube Cloud per developer seat, with a Free planFree plan, then plans sized in vCPUsFree, open source
MCP serverYes, in Cube CloudYes@hypequery/mcp
DatabasesManyClickHouse (theirs)ClickHouse (yours)

How to actually decide

Do BI tools need to consume the same metrics as your app? If yes, Cube — it's the only one of the three that treats Tableau and Metabase as first-class consumers.

Do you have zero ops capacity and no ClickHouse yet? Tinybird. Adopting ClickHouse plus an API layer is exactly the work it exists to remove. (Compare honestly against ClickHouse Cloud + hypequery, which keeps ownership at the cost of slightly more assembly.)

Do you already run ClickHouse and build in TypeScript? This is hypequery's home turf. A platform in the middle adds a second place your schema lives, a second pricing meter, and a second deploy pipeline — for capabilities your API stack may already have.

Is data residency non-negotiable? Tinybird is hard to fit: its self-managed regions, which run in your own AWS account, are beta and for development only. Cube and hypequery both leave data where it is.

Is the team SQL-first rather than TypeScript-first? Tinybird's Pipes workflow will feel natural. hypequery's value — compile-time types, code review, refactoring — mostly pays off for teams living in TypeScript.

Can you mix them?

Sometimes sensibly. Cube for the data team's BI consumers plus hypequery for product-facing features is a real pattern — they serve different audiences from the same ClickHouse. Tinybird combines less well, since it wants to be the database too.

Where to go from here

The pairwise pages go deeper: hypequery vs Cube and hypequery vs Tinybird. If you're leaving one of them, the switching guides cover migration specifics: Cube.js alternative, Tinybird alternative.

And if you want to skip straight to evidence: the quick start gets you from your ClickHouse schema to a typed, served endpoint in a few minutes — which is usually enough to know whether the library approach fits.

Decision checkpoint

If the tradeoff is already clear, move into implementation

Most teams do not need another round of comparison content after this point. The better test is whether the workflow holds up on your own schema and your own query complexity.

Related content

Continue into implementation

FAQ

When should I choose Cube?

Choose Cube when multiple consumers, especially BI tools, need the same metric definitions and pre-aggregations from a central semantic layer.

When should I choose Tinybird?

Choose Tinybird when you want the fastest managed path from data ingestion to hosted analytics APIs and are comfortable with the platform owning that serving layer.

When should I choose hypequery?

Choose hypequery when you already run ClickHouse and want schema-generated datasets and served endpoints inside your own application codebase, in TypeScript or Python.

Next step

Move from evaluation to your first dataset

Define a dataset in TypeScript or Python, query it by name, and decide whether it runs in-process or over HTTP.

Get early access to hypequery cloud.

Cloud hosts the same model you run in your backend, with a managed API and MCP server, versions, and rollback. We're letting teams in a few at a time. Join the waitlist and we'll reach out when your project can go live.

How do you want to build your analytics layer? (Optional)
What features do you most need? (Optional)

Pick as many as you like.

Only your email is required. All other questions are optional.