[hypequery](https://hypequery.com/) › Build vs Buy Embedded Analytics (2026): Costs, Risks and a Third Option
Index for agents: https://hypequery.com/llms.txt
Canonical page: https://hypequery.com/compare/build-vs-buy-embedded-analytics

> Should you build embedded analytics in-house or buy a platform? What each part really costs (data model, tenant isolation, caching, APIs, charts, AI agents), when each choice wins, and the middle path: an open-source data layer with your own front end.

[Open sourceApache 2.0](https://github.com/hypequery/hypequery)

Embedded analytics

# Build vs buy embedded analytics

Last updated November 14, 2026

Building looks cheap because the first chart is quick. Buying looks safe because the demo is polished. This guide breaks embedded analytics into its parts, says which ones are expensive to build, and covers the third option most product teams end up with.

[The three paths ](#paths)[Decide](#decide)

Definition

## What does build vs buy mean for embedded analytics?

Embedded analytics puts charts, reports or AI answers inside your own product, scoped to each customer. Building means your team writes the queries, API, tenant rules and charts. Buying means an embedded analytics platform provides dashboards and embedding, and you configure it.

Between the two sits a third path: adopt an open-source or hosted data layer for the hard backend parts, definitions, tenant isolation, caching and APIs, and build only the screens.

The options

## Three ways to ship embedded analytics

| Path                             | What you get                                                                                                   | Strengths                                                                                     | Costs and risks                                                                                                             |
| -------------------------------- | -------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| Build everything                 | Your own queries, API, tenant filters, caching and charts.                                                     | Full control, no vendor bill, nothing to fit around.                                          | You own every part, including the parts that are easy to get wrong: tenant isolation, cache scoping and metric consistency. |
| Buy a platform                   | An embedded BI vendor: dashboards, a builder, embedding by iframe, web component or SDK, and tenancy features. | Fastest route to dashboards customers can see. Some include self-service editing and AI chat. | Per-viewer or tier pricing, a look that is hard to make fully native, and a second copy of your metric logic.               |
| Adopt a data layer, build the UI | A semantic layer for the definitions, tenant rules, caching and APIs; your engineers build the screens.        | Native UI, one definition for app, API and agents, and no rebuild of the hard backend parts.  | You still build and maintain charts. The layer is a dependency you have to learn.                                           |

What it really costs

## The parts of embedded analytics, and which are expensive

Estimate each part on its own. Teams that underestimate building usually priced the charts and forgot the rows below and above them.

| Part                    | What it is                                                                                      | Cost to build and keep                                                                                             |
| ----------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| Metric definitions      | One place that says what revenue, active users or churn mean, used by every chart and endpoint. | Small at first. Grows with every new metric, and drifts when two queries define the same metric differently.       |
| Tenant isolation        | Every query limited to one customer’s rows, with the tenant taken from a verified session.      | The highest-stakes part. One missing filter is a data leak, so it needs to be enforced in one place and tested.    |
| Auth and embed tokens   | Short-lived signed tokens for the browser, verified on every request.                           | Moderate. Usually reuses your app’s auth.                                                                          |
| Query API               | Endpoints for each chart, with validated inputs, pagination and limits.                         | Grows linearly with charts unless queries are generated from a model.                                              |
| Caching and performance | Fast repeated queries without serving one tenant’s cached result to another.                    | Easy to add, easy to get wrong: the cache key must include the tenant.                                             |
| Charts and dashboards   | The part customers see: charts, filters, date pickers, exports.                                 | Large but familiar front-end work. Chart libraries do much of it.                                                  |
| Self-service            | Customers building their own reports.                                                           | Expensive to build well. The strongest reason to buy a platform.                                                   |
| AI agent access         | Letting an agent answer customers’ data questions.                                              | Text-to-SQL is quick to demo and hard to make safe. Needs the same definitions and tenant rules as the dashboards. |

For the security side in detail, including a pre-launch test list, see [data access control in a semantic layer](https://hypequery.com/semantic-layer/access-control).

Buying

## What to check before you buy a platform

- **Pricing at your scale.** Per-viewer, per-tier and flat pricing diverge quickly as customers grow. Price your expected viewer count, not today’s.
- **How tenancy is enforced.** A filter set on the embed token by your server is safe; a filter the browser sets is not.
- **Where the metric logic lives.** If the platform has its own model, your API and agents need a second copy, and the two drift.
- **Database support.** Check that your database is supported natively and that the queries it generates suit it.
- **Leaving.** Ask how dashboards and definitions export if you move off.

Twelve platforms are compared in [best embedded analytics platforms](https://hypequery.com/compare/embedded-analytics-platforms), and their published prices in [embedded analytics pricing](https://hypequery.com/compare/embedded-analytics-pricing).

The third option

## Adopt the data layer, build the screens

The expensive, risky parts of building are in the backend: definitions, tenant isolation, caching and the query API. The parts that make analytics feel like your product are in the front end. A semantic layer splits the work along that line.

Cube does this as a separate service with REST, GraphQL and Postgres-wire SQL APIs. hypequery does it as an open-source library inside your own backend, for ClickHouse: datasets in TypeScript or Python, a tenant key that refuses unscoped queries, a typed HTTP API and React hooks for your charts, and an MCP server so agents use the same definitions.

### What you no longer build

SQL per chart, tenant filters per query, cache keys, input validation and an agent tool layer.

### What you still build

Charts, filters and layout in your own components. hypequery has no chart components or dashboard builder.

### What it costs

The libraries are Apache 2.0 and free. You pay for the ClickHouse and servers you already run, plus the front-end time.

See [embedded analytics for SaaS](https://hypequery.com/clickhouse-saas-analytics) for a worked ClickHouse example.

Decide

## Which path fits

| Choose                  | When                                                                                                                                                 |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| Build                   | Analytics is a few fixed charts; one tenant or internal users only; you have no plans for customer self-service or agents.                           |
| Buy a platform          | You need customer-built reports or a dashboard editor soon; you have little front-end capacity; a vendor look and per-viewer pricing are acceptable. |
| Data layer plus your UI | Analytics is part of the product and must look native; you have many tenants; the same numbers must feed your API, app and AI agents.                |

The paths combine. Some teams adopt a data layer for their own charts and agents, and add a platform later only for customer self-service. One shared definition keeps the numbers consistent either way.

Questions

## Build vs buy embedded analytics FAQ

### Should I build or buy embedded analytics?

Buy a platform if customers need to build their own reports soon or you have little front-end capacity. Build if analytics is a few fixed charts for one audience. If analytics is a core part of your product, the usual middle path is to adopt a data layer for definitions, tenant isolation and APIs, and build the charts yourself.

### What is the hardest part of building embedded analytics?

Not the charts. The hard parts are tenant isolation that cannot be bypassed, metric definitions that stay consistent as the number of charts grows, and caching that never crosses tenants. They are also the parts where a mistake is a security incident rather than a bug.

### Can I buy the backend and build my own front end?

Yes. That is what headless or code-first tools do. Cube runs as a separate semantic layer service with REST, GraphQL and SQL APIs. hypequery is an open-source library in your own backend that serves a typed HTTP API, React hooks and an MCP server. In both, your team builds the UI.

### How long does it take to build embedded analytics in-house?

A first chart behind your existing auth can take days. Production-ready multi-tenant analytics, with consistent metrics, enforced tenant isolation, caching, exports and tests, is a much larger project, and maintenance never ends. Estimate each part on this page separately rather than the whole.

### Does buying a platform mean giving up control of the UI?

Partly. Platforms embedded by iframe have their own look, even when themed. Platforms with component SDKs come closer to native. Headless tools leave the whole UI to you, which is full control and full front-end work.

### How does hypequery fit into build vs buy?

hypequery covers the backend half of building: datasets with measures and a tenant key, a typed HTTP API, React hooks, tenant-scoped caching and an MCP server, all open source and run in your own app against ClickHouse. It has no chart components or dashboard builder, so the front end is yours to build.

## Sources

Vendor pages used for this page, all read on November 14, 2026.

- hypequery

  - [hypequery.com/docs/datasets/multi-tenancy](https://hypequery.com/docs/datasets/multi-tenancy)
  - [hypequery.com/docs/authentication](https://hypequery.com/docs/authentication)
  - [hypequery.com/docs/datasets/caching](https://hypequery.com/docs/datasets/caching)
  - [github.com/hypequery/hypequery](https://github.com/hypequery/hypequery)

- Cube

  [github.com/cube-js/cube/blob/master/docs-mintlify/reference/core-data-apis/sql-api/index.mdx](https://github.com/cube-js/cube/blob/master/docs-mintlify/reference/core-data-apis/sql-api/index.mdx)

Next step

## Build the screens, not the backend

Define ClickHouse datasets with a tenant key, then call them from React hooks, a typed API or an AI agent. Open source.

[Read the datasets docs ](https://hypequery.com/docs/datasets/overview)[Embedded analytics](https://hypequery.com/embedded-analytics)
