# hypequery > hypequery is an open-source embedded analytics toolkit for ClickHouse that runs inside your own application. You define datasets in TypeScript or Python (beta), with their dimensions, measures, metrics, and tenant rules, then query them by name and serve them as authenticated HTTP endpoints with OpenAPI, typed React hooks, and MCP tools for AI agents. The TypeScript SDK also includes a type-safe ClickHouse query builder. It is for engineers building dashboards, APIs, and agent tools on their own ClickHouse. hypequery is not a hosted BI tool, not a database, and not a separate semantic-layer server: it is a set of Apache 2.0 libraries you install and deploy with your backend. Each link below points to the clean Markdown version of the page where one exists. Any page under /docs, /blog, /compare, /examples, /recipes or /guides, and the homepage and product pages, also serves Markdown when requested with a .md suffix (/index.md for the homepage) or `Accept: text/markdown`. The full corpus is one file: [llms-full.txt](https://hypequery.com/llms-full.txt). hypequery cloud, a planned hosted service, is not live yet. ## Start here - [What is hypequery? ClickHouse analytics layer](https://hypequery.com/llms.mdx/docs/what-is-hypequery): A precise definition of hypequery, the packages it ships in TypeScript and Python, how it differs from ClickHouse drivers, Cube, Tinybird, and ORMs, and its current release status. - [Quick start: a ClickHouse semantic layer in TypeScript or Python](https://hypequery.com/llms.mdx/docs/quick-start): Install hypequery, connect ClickHouse, and define your first dataset of dimensions and measures in TypeScript or Python. The API, dashboard, MCP and AI SDK quick starts all build on it. - [Quick start: a ClickHouse analytics API and React dashboard](https://hypequery.com/llms.mdx/docs/quick-start/api-and-dashboard): Serve your ClickHouse dataset as an authenticated HTTP endpoint with OpenAPI, from TypeScript or Python, then chart it in React with typed hooks. - [ClickHouse MCP quickstart: connect Claude, Cursor and other agents](https://hypequery.com/llms.mdx/docs/mcp/quickstart): Give Claude, Cursor or any MCP client governed access to a ClickHouse table, from TypeScript or Python, then share it over HTTP. - [Quick start: ClickHouse tools for the Vercel AI SDK, Pydantic AI, Anthropic and OpenAI agents](https://hypequery.com/llms.mdx/docs/agents/quickstart): Give the AI chat in your product tenant-safe ClickHouse analytics tools, in TypeScript (Vercel AI SDK, Anthropic, OpenAI Agents SDK) or Python (Pydantic AI, Anthropic, OpenAI Agents SDK). No text-to-SQL, no MCP server to host, every query scoped to the signed-in customer. - [Why hypequery](https://hypequery.com/llms.mdx/docs/why-hypequery): Why hypequery exists, what it is and isn't, when it fits a ClickHouse project well, when it is a poor fit, and how it compares with the alternatives. - [Core concepts](https://hypequery.com/llms.mdx/docs/core-concepts): Datasets, serving, and clients in hypequery, and where the TypeScript query builder fits. - [TypeScript SDK for ClickHouse analytics](https://hypequery.com/llms.mdx/docs/introduction): Build a type-safe ClickHouse analytics backend with a TypeScript query builder, semantic datasets, multi-tenant APIs, React hooks, and MCP tools. - [Python SDK](https://hypequery.com/llms.mdx/docs/python): A code-first semantic layer for ClickHouse in Python. Define datasets once, query them by name, and serve them from FastAPI, Django or Flask. - [Datasets overview: TypeScript semantic layer](https://hypequery.com/llms.mdx/docs/datasets/overview): Define ClickHouse tables once in TypeScript, then reuse typed semantic definitions across APIs, jobs, dashboards, and agents. - [Datasets overview: Python semantic layer](https://hypequery.com/llms.mdx/docs/python/datasets/overview): Define ClickHouse tables once in Python, then query them by semantic name with tenant isolation and caching. - [MCP server for ClickHouse datasets](https://hypequery.com/llms.mdx/docs/mcp/overview): Expose hypequery datasets and metrics to AI agents through the Model Context Protocol. - [What the TypeScript SDK supports today](https://hypequery.com/llms.mdx/docs/capabilities): Current capability matrix for the ClickHouse TypeScript query builder, semantic datasets, Serve APIs, React hooks, and MCP tools. - [Feature status · Python](https://hypequery.com/llms.mdx/docs/python/feature-status): What the Python SDK supports today compared with TypeScript. - [Examples](https://hypequery.com/examples/llms.txt): runnable apps over one seeded ClickHouse, scaffold with `npx @hypequery/cli create -y`. - [Recipes](https://hypequery.com/recipes/llms.txt): one question, one dataset, the SQL it generates. - [Guides](https://hypequery.com/guides/llms.txt): long-form ClickHouse guides with CI-tested SQL. - [ClickHouse functions](https://hypequery.com/clickhouse/functions/llms.txt): per-function pages with the typed hypequery equivalent. ## Examples - [Embedded ClickHouse analytics with chDB: typed datasets, a CLI and an API, no server](https://hypequery.com/examples/chdb-embedded-analytics.md): Run a ClickHouse semantic layer inside your Python process with chDB: no Docker, no server, then point the same datasets at ClickHouse Cloud. - [A ClickHouse REST API with OpenAPI docs, API keys and rate limits](https://hypequery.com/examples/clickhouse-rest-api-openapi.md): Put a typed REST API in front of ClickHouse: named GET endpoints with validated params, API-key auth, rate limits, and an OpenAPI spec with live docs. - [Django analytics on ClickHouse: ORM for app data, typed datasets for metrics](https://hypequery.com/examples/django-analytics.md): Keep your Django models in SQLite or Postgres and serve ClickHouse analytics from typed hypequery datasets, scoped to request.user's organization. - [A FastAPI analytics API on ClickHouse with tenant-scoped datasets](https://hypequery.com/examples/fastapi-analytics-api.md): Serve governed ClickHouse analytics from FastAPI: datasets defined once in Python, query endpoints mounted beside your routes, tenant fixed by the token. - [A tenant-safe analytics agent in your Next.js app with the AI SDK](https://hypequery.com/examples/in-app-analytics-agent.md): Ship an analytics agent in your product: AI SDK chat with hypequery's tools, from Cloud or your own backend, and every answer stays in one customer. - [ClickHouse materialized view rollups: incremental vs refreshable](https://hypequery.com/examples/materialized-view-rollups.md): Pre-aggregate a million events two ways, incremental and refreshable, and query both through one typed hypequery dataset. - [A governed ClickHouse MCP server: agents query the semantic layer, not the database](https://hypequery.com/examples/mcp-agent-analytics.md): Give Claude Code, Cursor or any MCP client ClickHouse analytics through four governed tools: only published datasets, no SQL, one tenant per server. - [A governed ClickHouse MCP server in Python: agents query datasets, not SQL](https://hypequery.com/examples/mcp-agent-analytics-python.md): Give Claude Code, Cursor or Claude Desktop ClickHouse analytics from Python: a fixed set of query tools over published datasets, tenant fixed by env, no SQL. - [Multi-tenant embedded analytics on ClickHouse with signed tokens](https://hypequery.com/examples/multi-tenant-embedded-analytics.md): Embed tenant-scoped ClickHouse analytics in your product: your server mints a short-lived token, hypequery enforces the tenant on every query. - [Next.js dashboard on ClickHouse with cross-filtering](https://hypequery.com/examples/nextjs-dashboard.md): A Next.js 16 dashboard over ClickHouse: one typed dataset, a serve endpoint, React hooks, and click-to-filter across every panel. - [Add ClickHouse analytics to a Postgres + Drizzle app](https://hypequery.com/examples/postgres-app-clickhouse-analytics.md): Keep accounts in Postgres with Drizzle, serve usage from ClickHouse with hypequery, and join the two by account id in one API route. - [A governed Streamlit dashboard on ClickHouse with pandas export](https://hypequery.com/examples/streamlit-dashboard.md): Build a Streamlit dashboard on ClickHouse that reads only typed hypequery datasets: filters, a time series, breakdowns and a pandas CSV export. - [Usage-based billing on ClickHouse: metering, invoice previews and MRR](https://hypequery.com/examples/usage-based-billing.md): Meter per-tenant usage in ClickHouse and turn it into Decimal-exact invoice previews, a usage-this-month API and MRR, from one TypeScript definition. ## Recipes - [ClickHouse async inserts from Node.js: per-row vs batch vs async_insert](https://hypequery.com/recipes/async-inserts-node.md): Insert the same 1,000 rows from Node per row, in client batches and with async_insert, and count the parts each creates: 1,000, 4, 10 and 1. - [Cursor pagination in ClickHouse: keyset vs LIMIT/OFFSET, measured](https://hypequery.com/recipes/cursor-pagination.md): Page a tenant's events newest first with a keyset cursor on (occurred_at, event_id) and see from EXPLAIN and query_log why it beats OFFSET on deep pages. - [Tenant lookups with a ClickHouse dictionary and dictGet in a typed dataset](https://hypequery.com/recipes/dictionary-lookups.md): Load tenant plan and region into a ClickHouse dictionary, expose them as dataset dimensions via dictGet, and check the result and timing against a JOIN. - [Funnel analysis in ClickHouse with windowFunnel and a typed dataset](https://hypequery.com/recipes/funnel-windowfunnel.md): Count users through login, query and export within 24 hours per tenant with windowFunnel, get conversion per step, and see what each strict mode changes. - [Ordered per-user event timelines in ClickHouse with groupArray, arraySort and groupArraySorted](https://hypequery.com/recipes/grouparray-user-timelines.md): Build each user's event timeline in time order. groupArray's order is not guaranteed; sorting (time, id, value) tuples or groupArraySorted fixes it. - [ISO weeks in ClickHouse: toMonday buckets and %G-W%V labels across the year boundary](https://hypequery.com/recipes/iso-week-bucketing.md): Bucket events into Monday-to-Sunday ISO weeks with labels like 2026-W01, and see where toStartOfWeek, %Y and toWeek go wrong at new year. - [Latency and status buckets in ClickHouse with multiIf, as reusable dataset dimensions](https://hypequery.com/recipes/multiif-bucketing.md): Define latency and status-class buckets once with multiIf, keep them in bucket order, and see how CASE, transform and roundDown compare on real requests. - [p95 latency per event type in ClickHouse with a typed dataset](https://hypequery.com/recipes/p95-latency.md): Define p50, p95 and p99 latency once as dataset measures and get the quantile() SQL, the result on a million events, and the exactness trade-off. - [Add a ClickHouse projection that a typed dataset query uses automatically](https://hypequery.com/recipes/projection-for-dataset-queries.md): Add a sort-key and an aggregate projection to a ClickHouse table, then prove with EXPLAIN and query_log that an unchanged dataset query reads from them. - [Upserts and deletes in ClickHouse with ReplacingMergeTree and a typed dataset](https://hypequery.com/recipes/replacingmergetree-upserts.md): Upsert and delete rows with ReplacingMergeTree, read the latest version with FINAL or argMax, and pin the results before and after OPTIMIZE. - [Weekly retention cohorts in ClickHouse with a typed dataset](https://hypequery.com/recipes/retention-cohorts.md): Turn signup cohorts and weekly activity into a retention dataset: cohort size, active users and retention ratio, sliceable by cohort and week offset. - [Sessionization in ClickHouse with lagInFrame and a typed dataset](https://hypequery.com/recipes/sessionization.md): Split events into 30-minute inactivity sessions per user with lagInFrame and a running sum, then count sessions and average their length with a dataset. - [Top N per group in ClickHouse with LIMIT BY, compared with row_number() and rank()](https://hypequery.com/recipes/top-n-per-group-limit-by.md): Get the top 3 paths for every tenant in one query with LIMIT 3 BY, typed in TypeScript, and see how ties change the answer under rank() and dense_rank(). - [Per-plan data retention in ClickHouse with TTL and a typed dataset](https://hypequery.com/recipes/ttl-data-retention.md): Expire free-plan events after 30 days and starter events after 180 with TTL WHERE, clear a column with column TTL, and pin the result on any run date. ## ClickHouse guides - [ClickHouse with Docker Compose: a pinned, persistent local server with a million-row sample dataset](https://hypequery.com/guides/clickhouse-docker-compose.md): Run ClickHouse 25.8 in Docker Compose with a healthcheck, a password, volumes and a 1M-row sample dataset, then connect from Node, Python and hypequery. - [ClickHouse vs Postgres for app analytics: when Postgres is enough, and how to add ClickHouse](https://hypequery.com/guides/clickhouse-vs-postgres-app-analytics.md): Measured on the same million events: which analytics queries Postgres handles, which need ClickHouse, and how to move data with CDC, dual writes or batch pulls. - [Refreshable materialized views in ClickHouse: schedule, refresh, monitor and query them](https://hypequery.com/guides/refreshable-materialized-views.md): Create a refreshable materialized view on a schedule, refresh it on demand, watch it in system.view_refreshes, and query it through a typed hypequery dataset. - [A guide to materialized views in ClickHouse](https://hypequery.com/blog/a-guide-to-materialized-views-in-clickhouse.md): Incremental vs refreshable views, TO tables, engines, POPULATE pitfalls, projections, and how to query them with hypequery. - [chDB Python tutorial: embedded ClickHouse in Python](https://hypequery.com/blog/chdb-python-tutorial.md): pip install chdb, then chdb.query(): query Parquet, CSV and pandas with ClickHouse SQL, keep MergeTree tables on disk, and serve metrics. - [ClickHouse settings for application backends](https://hypequery.com/blog/clickhouse-settings-for-application-backends.md): readonly = 1 vs 2, 64-bit integer quoting for JavaScript clients, cancel_http_readonly_queries_on_client_close, and query limits for an API user. - [ClickHouse DateTime vs DateTime64 and time zones](https://hypequery.com/blog/clickhouse-datetime-vs-datetime64-time-zones.md): DateTime stores whole seconds and DateTime64(p) up to nanoseconds; both store a UTC instant, and the time zone only changes parsing and display. - [ClickHouse projections vs materialized views](https://hypequery.com/blog/clickhouse-projections-vs-materialized-views.md): A projection is a hidden copy inside the same table that queries use automatically; a materialized view writes to a separate table you query by name. - [ClickHouse PREWHERE vs WHERE](https://hypequery.com/blog/clickhouse-prewhere-vs-where.md): What PREWHERE does, why ClickHouse moves WHERE conditions to PREWHERE automatically, and when writing it by hand helps. - [ClickHouse pagination: cursor (keyset) vs LIMIT OFFSET](https://hypequery.com/blog/clickhouse-pagination-typescript.md): Why deep OFFSET pages get slower and how to paginate on the sort key instead, with TypeScript code. - [Postgres and MySQL to ClickHouse SQL equivalents](https://hypequery.com/blog/postgres-mysql-to-clickhouse-sql-equivalents.md): GROUP_CONCAT, unnest, date_trunc, CASE and more, mapped to their ClickHouse equivalents and checked on ClickHouse 26.6. - [Official ClickHouse MCP vs a governed MCP server](https://hypequery.com/blog/clickhouse-mcp-servers-compared.md): The official ClickHouse MCP server gives agents a read-only SQL tool; a governed MCP server gives them named metrics. When raw SQL access becomes a problem. - [Managed ClickHouse services compared](https://hypequery.com/blog/managed-clickhouse-services-compared.md): ClickHouse Cloud, Tinybird, Altinity.Cloud, Aiven, Instaclustr, Elestio, Alibaba and Yandex compared on deployment, pricing and fit. - [ClickHouse multi-tenant embedded analytics architecture](https://hypequery.com/blog/embedded-analytics-clickhouse-multi-tenant-dashboards.md): Shared tables, row policies plus app-side tenant scoping, a typed API, quotas and fast dashboards for multi-tenant analytics on ClickHouse. ## ClickHouse functions - [toStartOfDay](https://hypequery.com/clickhouse/functions/to-start-of-day): Truncate a DateTime to midnight — the foundation of daily analytics bucketing. - [toStartOfWeek](https://hypequery.com/clickhouse/functions/to-start-of-week): Round a date down to the start of its week. Mode 0, the default, starts weeks on Sunday; mode 1 starts them on Monday. - [toStartOfMonth](https://hypequery.com/clickhouse/functions/to-start-of-month): Truncate a DateTime to the first day of the month for MoM reporting. - [toStartOfQuarter](https://hypequery.com/clickhouse/functions/to-start-of-quarter): Round a DateTime to the first day of the quarter for QoQ reporting. - [toStartOfInterval](https://hypequery.com/clickhouse/functions/to-start-of-interval): Bucket timestamps by any interval: 100 milliseconds, 5 minutes, 2 weeks. - [now](https://hypequery.com/clickhouse/functions/now): Return the current server DateTime — the anchor for relative time filters. - [toDate](https://hypequery.com/clickhouse/functions/to-date): Convert a DateTime, string or number to a Date, and know which inputs it clamps. - [formatDateTime](https://hypequery.com/clickhouse/functions/format-date-time): Format a date as a string with MySQL-style % directives. %M is the month name; %i is minutes. - [count](https://hypequery.com/clickhouse/functions/count): Count rows or non-NULL values — ClickHouse's fastest aggregate. - [uniq](https://hypequery.com/clickhouse/functions/uniq): Approximate distinct count — fast cardinality estimation for DAU and unique visitors. - [sum](https://hypequery.com/clickhouse/functions/sum): Sum a numeric column. Integer sums widen to Int64 or UInt64, which matters in TypeScript. - [sumIf](https://hypequery.com/clickhouse/functions/sum-if): Conditional aggregation with the -If combinator: sumIf, countIf, avgIf, quantileIf. - [avg](https://hypequery.com/clickhouse/functions/avg): Calculate the arithmetic mean — average order value, session duration, latency. - [quantile](https://hypequery.com/clickhouse/functions/quantile): Approximate percentiles (p50, p95, p99) for latency and performance metrics. - [groupArray](https://hypequery.com/clickhouse/functions/group-array): Collect a group's values into an array. Row order is not guaranteed, so sort explicitly. - [toString](https://hypequery.com/clickhouse/functions/to-string): Convert any ClickHouse value to a String, including dates in a chosen time zone. - [concat](https://hypequery.com/clickhouse/functions/concat): Concatenate strings — build labels, composite keys, and display values. - [if](https://hypequery.com/clickhouse/functions/if): Inline conditional — the ternary operator of ClickHouse SQL. - [multiIf](https://hypequery.com/clickhouse/functions/multi-if): ClickHouse's CASE WHEN: return the value for the first true condition, with a default. - [round](https://hypequery.com/clickhouse/functions/round): Round a number to N decimal places — clean display values and bucketing. - [intDiv](https://hypequery.com/clickhouse/functions/int-div): Integer division — bucket IDs, page numbers, and fixed-width range grouping. - [min](https://hypequery.com/clickhouse/functions/min): Return the smallest value in a group — earliest signup, cheapest order, fastest response. - [max](https://hypequery.com/clickhouse/functions/max): Return the maximum value in a column — the go-to aggregate for peaks, latest timestamps, and largest orders. - [uniqExact](https://hypequery.com/clickhouse/functions/uniq-exact): Count distinct values exactly — the precise, memory-heavy counterpart to uniq(). - [coalesce](https://hypequery.com/clickhouse/functions/coalesce): Return the first non-NULL argument — the standard fix for Nullable(T) columns leaking into results. - [dateDiff](https://hypequery.com/clickhouse/functions/date-diff): Count calendar-boundary crossings between two dates — not elapsed time, which is the gotcha everyone hits. - [arrayMap](https://hypequery.com/clickhouse/functions/array-map): Transform every element of an array with a lambda — no subquery, no UNNEST. - [arrayFilter](https://hypequery.com/clickhouse/functions/array-filter): Keep only the array elements that match a lambda predicate — the array-native WHERE clause. ## Compare - [hypequery vs @clickhouse/client](https://hypequery.com/llms.mdx/compare/hypequery-vs-clickhouse-client): @clickhouse/client is still the right low-level transport layer. hypequery is the better fit when the application also needs generated schema types, reusable query definitions, and a typed API surface on top of ClickHouse. - [hypequery vs Kysely](https://hypequery.com/llms.mdx/compare/hypequery-vs-kysely): Kysely is an excellent general TypeScript query builder. hypequery is narrower and more opinionated around ClickHouse runtime type mapping, schema generation, and reusable analytics APIs. - [hypequery vs Drizzle](https://hypequery.com/llms.mdx/compare/hypequery-vs-drizzle): Drizzle ORM does not support ClickHouse. hypequery is the TypeScript-first alternative for teams who want schema generation from a live ClickHouse database, a composable query builder, and a typed API layer. - [hypequery vs Prisma](https://hypequery.com/llms.mdx/compare/hypequery-vs-prisma): Prisma does not support ClickHouse. hypequery gives TypeScript teams the closest equivalent for ClickHouse analytics, with schema generation, typed queries, and an API layer built around the ClickHouse data model. - [hypequery vs Cube](https://hypequery.com/llms.mdx/compare/hypequery-vs-cube): Cube is a semantic layer platform for centralized metrics. hypequery is a lighter, code-first analytics layer that lives in your codebase, in TypeScript or Python, for product engineers building ClickHouse-backed features. They solve different problems. - [hypequery vs Tinybird](https://hypequery.com/llms.mdx/compare/hypequery-vs-tinybird): Tinybird is a managed ClickHouse platform with a built-in API layer. hypequery is the better fit when your data needs to stay in your own ClickHouse and your team wants the analytics layer as code it owns, in TypeScript or Python. - [ClickHouse Cloud vs Tinybird](https://hypequery.com/llms.mdx/compare/clickhouse-cloud-vs-tinybird): ClickHouse Cloud is a managed ClickHouse database billed by compute time and compressed storage. Tinybird is a platform on ClickHouse that adds ingestion, hosted SQL API endpoints and tokens, billed by plan size in vCPUs. Pick Tinybird for hosted analytics APIs with little backend work; pick ClickHouse Cloud when your own services and tools need direct read and write access to ClickHouse. - [Cube vs Tinybird vs hypequery](https://hypequery.com/llms.mdx/compare/cube-vs-tinybird-vs-hypequery): Cube, Tinybird, and hypequery all put an API layer between ClickHouse and applications. Cube is a semantic layer platform, Tinybird is a managed analytics service, and hypequery is an open-source analytics layer in your codebase. - [hypequery vs Moose (MooseStack)](https://hypequery.com/llms.mdx/compare/hypequery-vs-moose): MooseStack has reached end of life and is no longer actively maintained. Do not start a new production system on it. hypequery is the active, narrower replacement for its query models, APIs, React hooks, and MCP tools, in TypeScript or Python. - [hypequery vs dbt](https://hypequery.com/llms.mdx/compare/hypequery-vs-dbt): dbt transforms data inside ClickHouse on a schedule. hypequery serves ClickHouse data to applications at request time, from TypeScript or Python. Most teams comparing them are really deciding where the transformation boundary sits, and many end up using both. - [hypequery vs Propel](https://hypequery.com/llms.mdx/compare/hypequery-vs-propel): Propel was a serverless analytics platform on ClickHouse with GraphQL and SQL APIs, a semantic layer and embeddable React components. As of 8 November 2026 its website, docs and console addresses all point to a domain-parking page, so do not plan new work on it. hypequery covers the typed API layer on a ClickHouse you run; Tinybird is the closest active managed platform. - [hypequery vs TypeORM](https://hypequery.com/llms.mdx/compare/hypequery-vs-typeorm): TypeORM does not support ClickHouse and has no credible workaround, because its entity/decorator model is built for transactional row stores, not columnar append-only analytics. hypequery is the ClickHouse-native TypeScript layer; the realistic setup is coexistence, with TypeORM on Postgres/MySQL and hypequery on the ClickHouse side. - [hypequery vs Metabase](https://hypequery.com/llms.mdx/compare/hypequery-vs-metabase): Metabase is a BI tool with an official ClickHouse connector and several ways to embed it. Guest embeds work on every plan, and modular embedding with SSO, the React SDK and full app embedding come with Pro and Enterprise. It is the faster route to charts, especially for internal analytics. hypequery is the code-first route for customer-facing analytics, where queries are typed, tenant rules live in your own auth and the UI is your own React components. - [hypequery vs the ClickHouse HTTP Interface](https://hypequery.com/llms.mdx/compare/hypequery-vs-clickhouse-http): The ClickHouse HTTP interface is excellent for scripts, health checks, and one-off queries, and it's the transport hypequery uses under the hood. hypequery is the better fit once the same queries live in application code and need types, reuse, and safe parameters. - [hypequery vs Raw SQL](https://hypequery.com/llms.mdx/compare/hypequery-vs-raw-sql): Raw SQL strings are the right call for one-off scripts and genuinely gnarly analytical SQL. hypequery agrees, which is why selectExpr and withCTE let you drop to raw SQL any time. The case for the builder is the repeated, application-embedded queries where hand-written strings and interfaces silently drift from your schema. - [hypequery vs clickhouse-connect](https://hypequery.com/llms.mdx/compare/hypequery-vs-clickhouse-connect): clickhouse-connect is the official Python driver, and it runs the SQL you write. hypequery runs on top of it and adds shared measures, request validation, and tenant isolation. Use the driver for raw SQL and inserts, and hypequery for the numbers your product shares. - [hypequery vs ClickHouse Agents](https://hypequery.com/llms.mdx/compare/hypequery-vs-clickhouse-agents): ClickHouse Agents is a managed chat and agent builder for your own team, inside ClickHouse Cloud. hypequery gives the agent you ship in your product governed, tenant-scoped ClickHouse tools, so your customers can ask questions about their own data. Many teams will want both. ## Alternatives and use cases - [hypequery homepage](https://hypequery.com/llms.mdx/pages): Overview: define metrics once in TypeScript or Python, then serve dashboards, APIs and agents from ClickHouse. - [Embedded analytics for developers](https://hypequery.com/llms.mdx/pages/embedded-analytics): What embedded analytics is, when to embed a BI tool and when to build, tenant isolation on ClickHouse, and the three kinds of tool. Vendor-by-vendor comparison is at /compare/embedded-analytics-platforms. - [ClickHouse for TypeScript and Python developers](https://hypequery.com/llms.mdx/pages/clickhouse): Hub for querying ClickHouse from application code: TypeScript and Python guides, frameworks, SQL patterns, the function reference, APIs and MCP. - [What is a semantic layer](https://hypequery.com/llms.mdx/pages/semantic-layer): What a semantic layer is, the five places one can live, and how dbt MetricFlow, Snowflake semantic views, Databricks metric views and OSI compare with a layer defined in code. - [dbt Semantic Layer and MetricFlow](https://hypequery.com/llms.mdx/pages/semantic-layer/dbt-metricflow): Semantic models, metric types and the Semantic Layer APIs, compared with a semantic layer defined in code. - [Snowflake semantic views](https://hypequery.com/llms.mdx/pages/semantic-layer/snowflake-semantic-views): CREATE SEMANTIC VIEW, the SEMANTIC_VIEW() query and Cortex Analyst, compared with a semantic layer defined in code. - [Databricks metric views](https://hypequery.com/llms.mdx/pages/semantic-layer/databricks-metric-views): Unity Catalog metric views in YAML, the MEASURE() function and Genie, compared with a semantic layer defined in code. - [Cube semantic layer](https://hypequery.com/llms.mdx/pages/semantic-layer/cube): Cubes, views, measures and joins in YAML, the REST, GraphQL and SQL APIs, and pre-aggregations, compared with a semantic layer defined in code. - [Apache Ossie (Open Semantic Interchange)](https://hypequery.com/llms.mdx/pages/semantic-layer/open-semantic-interchange): Apache Ossie, formerly OSI, the vendor-neutral spec for exchanging semantic models: who is behind it, what the format covers and what it leaves out. - [Open-source semantic layer tools](https://hypequery.com/llms.mdx/pages/semantic-layer/open-source-tools): Open-source semantic layers compared by licence, model format, databases, APIs and MCP support, including Cube Core, MetricFlow and hypequery. - [Semantic layer for AI agents](https://hypequery.com/llms.mdx/pages/semantic-layer/ai-agents): Why agents need named metrics instead of raw SQL, what to check (no SQL tool, tenant scope, query limits) and how each semantic layer exposes MCP tools. - [Analytics MCP server](https://hypequery.com/llms.mdx/pages/semantic-layer/analytics-mcp-server): Database MCP servers that run SQL versus semantic layer servers that query named metrics, what to check before production, and how the main servers compare. - [Data access control](https://hypequery.com/llms.mdx/pages/semantic-layer/access-control): Tenant isolation, row-level and column-level rules, cache scoping and a pre-launch test list for dashboards, embedded analytics and agents. - [Headless BI](https://hypequery.com/llms.mdx/pages/semantic-layer/headless-bi): What headless BI is, how it differs from a semantic layer, the three ways to put analytics in a product and which vendors sell it. - [dbt Semantic Layer alternatives](https://hypequery.com/llms.mdx/pages/semantic-layer/dbt-semantic-layer-alternatives): Nine alternatives compared by model format, databases (including ClickHouse), APIs, MCP and licence, and when to stay on dbt. - [ClickHouse semantic layer](https://hypequery.com/llms.mdx/pages/clickhouse-semantic-layer): What a semantic layer is, and how to define one for ClickHouse in TypeScript or Python with typed datasets, tenant keys and time keys. - [Embedded analytics buyer's guide for TypeScript teams](https://hypequery.com/llms.mdx/pages/compare/embedded-analytics-typescript): Compare architectures by metric governance, tenant isolation, type safety, change control and UI ownership, with a proof-based evaluation checklist. - [Best embedded analytics platforms](https://hypequery.com/llms.mdx/pages/compare/embedded-analytics-platforms): Fifteen platforms grouped by approach (code-first and headless, embedded BI, and BI tools with embedding), with embedding method, multi-tenancy, pricing model and who each suits. - [Build vs buy embedded analytics](https://hypequery.com/llms.mdx/pages/compare/build-vs-buy-embedded-analytics): What each part of embedded analytics costs to build, when buying a platform wins, and the middle path of an open-source data layer with your own front end. - [Embedded analytics pricing compared](https://hypequery.com/llms.mdx/pages/compare/embedded-analytics-pricing): Pricing models, lowest published prices and what is gated behind higher tiers, with one 1,000-viewer scenario priced across every vendor that publishes enough to do it. - [Luzmo alternatives](https://hypequery.com/llms.mdx/pages/compare/luzmo-alternatives): Alternatives grouped by why teams leave Luzmo, whether they want to own the front end, give customers a full BI tool or cut cost at scale. - [Embeddable alternatives](https://hypequery.com/llms.mdx/pages/compare/embeddable-alternatives): Alternatives grouped by why teams leave Embeddable. Some want the UI and data layer in their repo, some want a full BI tool for customers, some want published pricing, and some want ClickHouse without Cube. - [hypequery vs Embeddable](https://hypequery.com/llms.mdx/pages/compare/hypequery-vs-embeddable): Where the data model lives, how tenant isolation is enforced, who owns the UI, and what each serves besides dashboards. - [hypequery vs Luzmo](https://hypequery.com/llms.mdx/pages/compare/hypequery-vs-luzmo): Hosted embedded BI with a dashboard editor, or a ClickHouse semantic layer in your repo: data model, tenant isolation, UI ownership, MCP and pricing. - [hypequery vs QueryPanel](https://hypequery.com/llms.mdx/pages/compare/hypequery-vs-querypanel): Hosted text-to-SQL with tenant filters, or reviewed metric definitions compiled in your own backend: data flow, tenant isolation, ClickHouse support and pricing. - [Cube alternatives](https://hypequery.com/llms.mdx/pages/cube-js-alternative): Semantic layers compared for embedded analytics and AI agents, covering hypequery, the dbt Semantic Layer, AtScale, GoodData and Boring Semantic Layer. - [Embedded analytics for SaaS on ClickHouse](https://hypequery.com/llms.mdx/pages/clickhouse-saas-analytics): How hypequery serves in-app dashboards, customer-facing APIs and AI agents from one typed, tenant-scoped model on ClickHouse. - [Tinybird alternatives](https://hypequery.com/llms.mdx/pages/tinybird-alternative): ClickHouse Cloud, self-hosted ClickHouse, Cube and hypequery compared as Tinybird alternatives for typed analytics APIs on ClickHouse you own. - [ClickHouse TypeScript client for ClickHouse Cloud](https://hypequery.com/llms.mdx/pages/clickhouse-typescript): The official @clickhouse/client, and how hypequery adds schema-generated types, typed queries and APIs on top of it. - [ClickHouse query builder for TypeScript](https://hypequery.com/llms.mdx/pages/clickhouse-query-builder): Schema-generated types, native ClickHouse syntax, and a path from one-off queries to reusable API definitions. - [ClickHouse ORM](https://hypequery.com/llms.mdx/pages/clickhouse-orm): Why Prisma, Drizzle and TypeORM do not support ClickHouse, and the typed query workflow to use instead. - [ClickHouse API](https://hypequery.com/llms.mdx/pages/clickhouse-api): ClickHouse's HTTP interface on ports 8123 and 8443 for raw SQL, versus an app-facing REST API with auth, validation and OpenAPI built from typed queries. - [ClickHouse MCP server](https://hypequery.com/llms.mdx/pages/clickhouse-mcp): A governed MCP server: agents query named datasets and metrics, never raw SQL. Connect Claude, Cursor or Codex from TypeScript or Python. - [ClickHouse multi-tenant analytics](https://hypequery.com/llms.mdx/pages/clickhouse-multi-tenant-analytics): Automatic tenant scoping, typed APIs and reusable query definitions for multi-tenant analytics on ClickHouse. - [ClickHouse Python clients](https://hypequery.com/llms.mdx/pages/clickhouse-python): clickhouse-connect, the official client, compared with clickhouse-driver, clickhouse-sqlalchemy and hypequery, with safe dynamic queries. - [ClickHouse analytics in Python](https://hypequery.com/llms.mdx/pages/clickhouse-python-analytics): Named measures, joins and tenant rules in Python, queried from jobs and notebooks and served to dashboards and agents. - [Python semantic layer for ClickHouse](https://hypequery.com/llms.mdx/pages/python-semantic-layer): Measures, dimensions, relationships and tenant rules as Python code, running inside your app with no YAML and no separate server. - [ClickHouse with FastAPI](https://hypequery.com/llms.mdx/pages/clickhouse-fastapi): Authenticated, tenant-scoped FastAPI endpoints over ClickHouse with request validation and rate limiting. - [ClickHouse with Django](https://hypequery.com/llms.mdx/pages/clickhouse-django): Shared, tenant-scoped ClickHouse definitions called from Django views and tasks, with the Django ORM kept for transactional data. - [ClickHouse with Flask](https://hypequery.com/llms.mdx/pages/clickhouse-flask): ClickHouse measures defined once in Python and queried per customer from Flask routes, with typed DataFrames for exports. - [ClickHouse to pandas](https://hypequery.com/llms.mdx/pages/clickhouse-pandas): Pull ClickHouse measures into pandas from the same definitions your product uses. - [ClickHouse with SQLAlchemy](https://hypequery.com/llms.mdx/pages/clickhouse-sqlalchemy): SQLAlchemy for ad hoc SQL against ClickHouse, hypequery for shared, tenant-scoped measures. - [ClickHouse MCP server for Python backends](https://hypequery.com/llms.mdx/pages/clickhouse-python-mcp): Expose Python-defined ClickHouse datasets to Claude, Cursor and other MCP clients; agents only see the endpoints they may call. - [Multi-tenant ClickHouse analytics in Python](https://hypequery.com/llms.mdx/pages/clickhouse-python-multi-tenant): Declare a tenant key once; every query is scoped to the caller, and queries without a trusted tenant are refused. - [Multi-tenant SaaS analytics](https://hypequery.com/llms.mdx/pages/use-cases/multi-tenant-saas): Build customer-facing ClickHouse analytics with tenant scoping and role checks that live in one reviewable backend path. - [Internal product APIs](https://hypequery.com/llms.mdx/pages/use-cases/internal-product-apis): Add ClickHouse analytics to the backend you already run without rewriting your public API surface first. ## Guides - [Authentication · Serve](https://hypequery.com/llms.mdx/docs/authentication): Add authentication with API keys, typed auth guards, and shared auth context. - [chDB (Embedded ClickHouse) · Query builder](https://hypequery.com/llms.mdx/docs/chdb): Run hypequery on embedded ClickHouse with chDB. No server, same builder code. Local dev, CI tests, and serverless with the exact query builder you ship to production. - [CLI telemetry preferences](https://hypequery.com/llms.mdx/docs/telemetry): Inspect and control anonymous CLI usage telemetry preferences - [CORS · Serve](https://hypequery.com/llms.mdx/docs/cors): Configure CORS for serve({ queries }) when browser clients need cross-origin access. - [Embedded Runtime · Serve](https://hypequery.com/llms.mdx/docs/embedded-runtime): Run hypequery queries directly inside your application, without HTTP, from SSR routes, cron jobs, queues or AI agents. - [FAQ · Reference](https://hypequery.com/llms.mdx/docs/faq): Answers to common hypequery questions: what it is, using it with ClickHouse, React hooks, performance and caching, and deployment. - [Fetch Runtime Integration · Serve](https://hypequery.com/llms.mdx/docs/fetch): Mount hypequery in Hono, Cloudflare Workers, Bun, Deno, React Router, SvelteKit, or any Fetch-based runtime. - [Introduction · Cloud](https://hypequery.com/llms.mdx/docs/cloud): The planned hosted service for your ClickHouse semantic layer, serving REST and MCP endpoints. Not live yet. - [Multi-Tenancy · Serve](https://hypequery.com/llms.mdx/docs/multi-tenancy): Configure tenant extraction and isolation in the serve({ queries }) runtime. - [Next.js · Serve](https://hypequery.com/llms.mdx/docs/nextjs): Mount hypequery in a Next.js App Router project, run queries in server code, and call the typed API from client components. - [Node.js · Serve](https://hypequery.com/llms.mdx/docs/nodejs): Mount hypequery in Express or Fastify, or run it behind a dedicated Node.js server with Hono. - [Observability · Serve](https://hypequery.com/llms.mdx/docs/observability): Track runtime execution, slow queries, and builder-level query logs in hypequery. - [Rate Limiting · Serve](https://hypequery.com/llms.mdx/docs/rate-limiting): Protect serve({ queries }) runtimes with middleware-based rate limiting. - [Re-using Queries · Query builder](https://hypequery.com/llms.mdx/docs/re-using-queries): Turn typed builder logic into reusable query definitions with the query function. - [Runtime Features · Serve](https://hypequery.com/llms.mdx/docs/runtime-features): Middleware, auth injection, and runtime inspection for serve({ queries }). - [Schemas · Query builder](https://hypequery.com/llms.mdx/docs/schemas): Validate ClickHouse query inputs and outputs with Zod. Use schemas for type-safe TypeScript APIs, runtime validation, and OpenAPI generation. - [Serve ClickHouse queries over HTTP with OpenAPI](https://hypequery.com/llms.mdx/docs/http-openapi): Expose hypequery queries and datasets through HTTP handlers and autogenerated docs - [Vite · Serve](https://hypequery.com/llms.mdx/docs/vite): Run hypequery next to a Vite frontend and proxy API requests in development. ## Query building - [Aggregation · Query builder](https://hypequery.com/llms.mdx/docs/query-building/aggregation): Group ClickHouse data with typed sums, counts, percentiles, argMax, standard deviation, variance, and time intervals. - [ClickHouse joins in TypeScript: inner, left, full and ARRAY JOIN](https://hypequery.com/llms.mdx/docs/query-building/joins): Typed ClickHouse joins with hypequery's query builder. Inner, left, right and full joins, ARRAY JOIN and LEFT ARRAY JOIN, aliases and join relationships. - [ClickHouse query builder basics (TypeScript)](https://hypequery.com/llms.mdx/docs/query-building/basics): Learn the hypequery ClickHouse query builder for TypeScript. Build type-safe queries with autocomplete, reusable filters, joins, and strongly typed results. - [ClickHouse query builder setup (TypeScript)](https://hypequery.com/llms.mdx/docs/query-building/setup): Install @hypequery/clickhouse, generate TypeScript types from your ClickHouse schema, and run a first type-safe query, without defining datasets. - [ClickHouse SELECT in TypeScript: columns, aliases and expressions](https://hypequery.com/llms.mdx/docs/query-building/select): Select and transform ClickHouse columns with a type-safe TypeScript query builder. Learn aliases, expressions, joins, and strongly typed result shapes. - [ClickHouse subqueries and CTEs in TypeScript](https://hypequery.com/llms.mdx/docs/query-building/subqueries-ctes): Build ClickHouse WITH clauses, recursive CTEs, scalar WITH aliases and subqueries in FROM and WHERE with the hypequery TypeScript query builder. - [ClickHouse time functions in TypeScript](https://hypequery.com/llms.mdx/docs/query-building/time-functions): hypequery's ClickHouse date helpers. toDateTime, formatDateTime with % directives, datePart, toStartOfInterval buckets, time filters and time zones. - [Inserts · Query builder](https://hypequery.com/llms.mdx/docs/query-building/inserts): Insert rows into ClickHouse with a type-safe TypeScript API. Row shapes are derived from your schema, with nullable columns optional and value types checked at compile time. - [Inspect and debug hypequery queries: toSQL, raw SQL and settings](https://hypequery.com/llms.mdx/docs/query-building/helper-methods): hypequery query builder helpers: inspect generated SQL, run raw SQL, pass ClickHouse query settings, debug and inspect queries, and keep them type-safe. - [Nested AND/OR filters for ClickHouse in TypeScript (CrossFilter)](https://hypequery.com/llms.mdx/docs/query-building/advanced-filtering): Complex ClickHouse filters with hypequery: predicate trees with CrossFilter, its methods, CrossFilter with validated input, and date filtering patterns. - [Ordering · Query builder](https://hypequery.com/llms.mdx/docs/query-building/ordering): Sort and page ClickHouse results with hypequery: orderBy, limit, LIMIT BY, offset, pagination, distinct and sorting by expressions. - [Query Caching · Query builder](https://hypequery.com/llms.mdx/docs/query-building/caching): Cache query-builder execute() results with tags, TTLs, and custom providers. - [Reusable ClickHouse join paths in TypeScript (withRelation)](https://hypequery.com/llms.mdx/docs/query-building/join-relationships): Declare a ClickHouse join path once with JoinRelationships, including multi-step chains, and apply it by name with withRelation() in any hypequery query. - [SQL Expressions · Query builder](https://hypequery.com/llms.mdx/docs/query-building/sql-expressions): Use raw SQL and expression helpers when the fluent query builder isn't enough - [Where · Query builder](https://hypequery.com/llms.mdx/docs/query-building/where): Filter ClickHouse queries in TypeScript with hypequery's where builder. Learn operators, predicates, and reusable filtering patterns for type-safe analytics queries. ## Datasets - [Caching · Datasets](https://hypequery.com/llms.mdx/docs/datasets/caching): Cache dataset query results under opaque, tenant-safe keys, so repeated dashboard and API queries skip ClickHouse without mixing tenants. - [Catalog · Datasets](https://hypequery.com/llms.mdx/docs/datasets/catalog): Export a normalized catalog of hypequery datasets, dimensions, measures and agent metadata for internal tools, generated docs and AI agents. - [Dataset recipes · Datasets](https://hypequery.com/llms.mdx/docs/datasets/recipes): Copy-paste dataset patterns for KPI tiles, conversion rates, MoM and YoY growth, rolling windows, DAU/WAU/MAU, segments and top N on ClickHouse. - [Definition · Datasets](https://hypequery.com/llms.mdx/docs/datasets/defining-datasets): Create typed dataset definitions over ClickHouse tables and views, with dimensions, measures, relationships and tenant keys in TypeScript. - [Dimensions · Datasets](https://hypequery.com/llms.mdx/docs/datasets/dimensions): Define typed fields for selecting, grouping, and filtering dataset queries. - [Execution · Datasets](https://hypequery.com/llms.mdx/docs/datasets/execution): Run hypequery dataset queries: validate them, generate SQL, preview and execute them, pass execution context, read result metadata and stream large results. - [Filters · Datasets](https://hypequery.com/llms.mdx/docs/datasets/filters): Use typed filter helpers in dataset queries and filtered measures. - [Measures · Datasets](https://hypequery.com/llms.mdx/docs/datasets/measures): Define aggregations such as revenue, counts, averages, minimums, and maximums. - [Metrics · Datasets](https://hypequery.com/llms.mdx/docs/datasets/metrics): Define named metrics on hypequery datasets: base and derived metrics, time grains, MCP metadata, and when to use a metric query instead of a dataset query. - [Multi-tenancy · Datasets](https://hypequery.com/llms.mdx/docs/datasets/multi-tenancy): Use dataset tenant keys and runtime tenant context to enforce tenant-scoped execution. - [Relationships · Datasets](https://hypequery.com/llms.mdx/docs/datasets/relationships): Model links between datasets and query to-one related fields one hop deep. - [Segments · Datasets](https://hypequery.com/llms.mdx/docs/datasets/segments): Name a population once on the dataset and select it by name in queries. - [Serve integration · Datasets](https://hypequery.com/llms.mdx/docs/datasets/serve-integration): Serve hypequery datasets as HTTP endpoints with @hypequery/serve: register datasets, endpoint shapes and inputs, pagination, result metadata and streaming. - [Time grains · Datasets](https://hypequery.com/llms.mdx/docs/datasets/time-grains): Aggregate dataset queries by minute, hour, day, week, month, quarter, and year. - [Tool Generation · Datasets](https://hypequery.com/llms.mdx/docs/datasets/tool-generation): Generate catalog-backed dataset tools for agents and function-calling runtimes. ## Python SDK (beta) - [Authentication · Python Serve](https://hypequery.com/llms.mdx/docs/python/authentication): Authenticate Python Serve requests with JWTs, bearer tokens or API keys, and require roles and scopes per endpoint. - [Caching · Python datasets](https://hypequery.com/llms.mdx/docs/python/datasets/caching): Cache hypequery Python dataset query results for ClickHouse under opaque, tenant-safe keys. - [Dataset endpoints · Python Serve](https://hypequery.com/llms.mdx/docs/python/dataset-endpoints): Request and response shapes, pagination, and discovery for Python dataset endpoints. - [Definition · Python datasets](https://hypequery.com/llms.mdx/docs/python/datasets/defining-datasets): Create dataset definitions over ClickHouse tables and views in Python. - [Dimensions · Python datasets](https://hypequery.com/llms.mdx/docs/python/datasets/dimensions): Define typed fields for selecting, grouping, and filtering dataset queries in Python. - [Django · Python](https://hypequery.com/llms.mdx/docs/python/django): Settings, a tenant-bound request.analytics in every view, clients for tasks and commands, and hypequery's endpoints served natively. - [Embedded ClickHouse (chDB) · Python datasets](https://hypequery.com/llms.mdx/docs/python/datasets/chdb): Run Python datasets on chDB, the ClickHouse engine embedded in your process. No server, the same SQL, for tests, CI, local development and serverless. - [Errors · Python Serve](https://hypequery.com/llms.mdx/docs/python/errors): The error envelope, error types and HTTP status codes hypequery Python Serve returns, and how to raise the same errors from your own routes. - [Execution · Python datasets](https://hypequery.com/llms.mdx/docs/python/datasets/execution): Run hypequery Python dataset queries on ClickHouse or chDB: connect, validate, inspect the generated SQL, read results and stream large results. - [FastAPI · Python Serve](https://hypequery.com/llms.mdx/docs/python/fastapi): Mount hypequery's authenticated dataset endpoints in a FastAPI app, and query datasets from your own routes. - [Filters · Python datasets](https://hypequery.com/llms.mdx/docs/python/datasets/filters): Use typed filter helpers in Python dataset queries and filtered measures. - [Flask · Python](https://hypequery.com/llms.mdx/docs/python/flask): A Flask extension with app.config, a tenant loader, per-request tenant-bound clients, and hypequery's endpoints as a blueprint. - [Getting started · Python Serve](https://hypequery.com/llms.mdx/docs/python/serving): Serve hypequery datasets over HTTP from any Python framework, authenticated by default. - [HTTP security · Python Serve](https://hypequery.com/llms.mdx/docs/python/http-security): Allowed hosts, CORS, trusted proxies, and request ids for Python Serve. - [hypequery.datasets · Python reference](https://hypequery.com/llms.mdx/docs/python/reference/datasets-api): Reference for the dataset definition, query, client, cache and catalog API. - [hypequery.execution · Python reference](https://hypequery.com/llms.mdx/docs/python/reference/execution-api): Reference for the ClickHouse and embedded chDB executors. - [hypequery.serve · Python reference](https://hypequery.com/llms.mdx/docs/python/reference/serve-api): Reference for Python Serve, the framework-neutral HTTP API and its adapters. - [Measures · Python datasets](https://hypequery.com/llms.mdx/docs/python/datasets/measures): Define aggregations such as revenue, counts, averages, minimums, and maximums in Python. - [Multi-tenancy · Python datasets](https://hypequery.com/llms.mdx/docs/python/datasets/multi-tenancy): Use tenant keys and trusted execution context to enforce tenant-scoped Python queries. - [Multi-tenancy · Python Serve](https://hypequery.com/llms.mdx/docs/python/multi-tenancy): Scope every hypequery Python Serve request to the authenticated tenant: where the tenant comes from, requiring one per endpoint, and your own routes. - [Observability · Python Serve](https://hypequery.com/llms.mdx/docs/python/observability): Observe hypequery Python Serve endpoints with query events, audited diagnostics and request ids. - [pandas, Polars and Arrow · Python](https://hypequery.com/llms.mdx/docs/python/dataframes): Convert dataset results to typed DataFrames, with column types taken from your dataset definitions. - [Production · Python Serve](https://hypequery.com/llms.mdx/docs/python/production): Run Python Serve as a hardened standalone process, with per-process budgets wherever it is served. - [Python CLI](https://hypequery.com/llms.mdx/docs/python/cli): Scaffold a Python dataset project from your ClickHouse schema, regenerate definitions, serve locally, and export client contracts. - [Rate limiting · Python Serve](https://hypequery.com/llms.mdx/docs/python/rate-limiting): Rate-limit hypequery Python Serve routes per caller: the defaults, custom rate-limit keys, and the stores that hold the counters. - [React and MCP clients · Python Serve](https://hypequery.com/llms.mdx/docs/python/client-endpoints): Serve Python datasets to generated, type-safe React hooks and to AI agents through the native Python MCP server. - [Relationships · Python datasets](https://hypequery.com/llms.mdx/docs/python/datasets/relationships): Define relationships between hypequery Python datasets, query to-one related fields one hop deep, and check the ClickHouse join keys behind them. - [SQLAlchemy · Python](https://hypequery.com/llms.mdx/docs/python/sqlalchemy): Point hypequery at the ClickHouse server your SQLAlchemy engine already uses. - [Time grains · Python datasets](https://hypequery.com/llms.mdx/docs/python/datasets/time-grains): Aggregate Python dataset queries by minute, hour, day, week, month, quarter, and year. ## MCP - [Claude Code plugin · MCP](https://hypequery.com/llms.mdx/docs/mcp/claude-code-plugin): Install hypequery's agent skills and the hypequery app connector in Claude Code with one plugin. - [Clients · MCP](https://hypequery.com/llms.mdx/docs/mcp/clients): Connect hypequery MCP to Claude Desktop, Cursor, and other MCP clients. - [Config file · MCP](https://hypequery.com/llms.mdx/docs/mcp/configuration): Run the hypequery MCP server from a config file, for TypeScript datasets that aren't served by a Serve API. - [Programmatic usage · MCP](https://hypequery.com/llms.mdx/docs/mcp/programmatic): Start the hypequery MCP server from your own Node process instead of the CLI, including tenant-scoped servers, shutdown and the config shape. - [Remote MCP over HTTP](https://hypequery.com/llms.mdx/docs/mcp/remote): Serve hypequery MCP over Streamable HTTP from your own infrastructure, behind a static key or OAuth, in TypeScript or Python. - [Safety model · MCP](https://hypequery.com/llms.mdx/docs/mcp/safety): What the hypequery MCP server constrains for AI agents (datasets, tenant scope, no raw SQL), what it doesn't replace, and safer patterns for remote servers. - [Tools · MCP](https://hypequery.com/llms.mdx/docs/mcp/tools): The four tools the hypequery MCP server gives agents (list_datasets, get_dataset_schema, query_metric, query_dataset), their arguments, pagination and errors. ## React - [Getting Started · React](https://hypequery.com/llms.mdx/docs/react/getting-started): Install @hypequery/react and set up typed TanStack Query hooks for a hypequery API, including the provider and datasets served from another repo or from Python. - [React hooks: advanced patterns](https://hypequery.com/llms.mdx/docs/react/advanced-patterns): Advanced React hooks configuration, HTTP methods, and cache management - [Using Queries · React](https://hypequery.com/llms.mdx/docs/react/using-queries): Use hypequery React hooks on a ClickHouse API: useQuery, useMutation, useDataset and useMetric, error handling, queries without input and common patterns. ## Reference - [CLI reference](https://hypequery.com/llms.mdx/docs/reference/api/cli): Every hypequery CLI command: init, dev, generate (schema types), generate:datasets, generate:manifest and telemetry, with which one to use when. - [ClickHouse Behavior · Reference](https://hypequery.com/llms.mdx/docs/reference/clickhouse-behavior): The ClickHouse-specific behavior that most often affects how you use hypequery. - [Connecting to ClickHouse · Reference](https://hypequery.com/llms.mdx/docs/reference/connection): Connect hypequery to ClickHouse: the Node setup, a browser and universal setup, connection options, and embedded ClickHouse with chDB. - [Inside the Query Builder · Reference](https://hypequery.com/llms.mdx/docs/reference/inside-the-query-builder): A plain-English look at how hypequery builds a query before it turns into SQL. - [Package Overview · Reference](https://hypequery.com/llms.mdx/docs/reference/packages): Quick guide to the official hypequery packages and when to use each one - [Query Builder API · Reference](https://hypequery.com/llms.mdx/docs/reference/api/query-builder): Quick reference for the hypequery ClickHouse query builder API. - [Query Definition · Reference](https://hypequery.com/llms.mdx/docs/reference/api/query): Reference for @hypequery/serve query definitions: initServe options, the returned initializer, query({ ... }), the query object and builder-style procedures. - [React hooks · Reference](https://hypequery.com/llms.mdx/docs/reference/api/react): Reference for @hypequery/react: useQuery, useMutation, the createHooks and createAnalyticsHooks APIs, HTTP methods, advanced options and exports. - [Read-only ClickHouse users (readonly = 1 and 2)](https://hypequery.com/llms.mdx/docs/reference/readonly-users): How hypequery works with ClickHouse users set to readonly = 1 or readonly = 2, and what each level costs you. - [Serve Runtime · Reference](https://hypequery.com/llms.mdx/docs/reference/api/runtime): Reference for the @hypequery/serve runtime: serve(config), the returned api object, api.queries, and the delivery modes for ClickHouse-backed endpoints. - [Trust Boundaries · Reference](https://hypequery.com/llms.mdx/docs/reference/trust-boundaries): Understand which hypequery APIs are safe for public semantic input and which APIs execute trusted developer-authored SQL. - [Type Helpers · Reference](https://hypequery.com/llms.mdx/docs/reference/api/types): TypeScript helpers for the current hypequery query and serve APIs. ## Cloud (not live yet: planned hosted service, no sign-up available) - [AI authoring · Cloud](https://hypequery.com/llms.mdx/docs/cloud/ai-authoring): Let hypequery cloud's AI learn your business and draft your datasets. - [AI SDK · Cloud](https://hypequery.com/llms.mdx/docs/cloud/ai-sdk): Build an agent in your own app with the Vercel AI SDK, using hypequery cloud's MCP server as its tools. - [API keys & tenants · Cloud](https://hypequery.com/llms.mdx/docs/cloud/api-keys): Runtime API keys for hypequery cloud, with per-key roles, scopes, and tenant authority for customer-facing analytics. - [CLI commands · Cloud](https://hypequery.com/llms.mdx/docs/cloud/cli): hypequery CLI commands for working with hypequery cloud. - [ClickHouse users · Cloud](https://hypequery.com/llms.mdx/docs/cloud/clickhouse-users): How hypequery cloud queries ClickHouse with read-only users, and the settings profile it relies on. - [Cloud operation commands](https://hypequery.com/llms.mdx/docs/cloud/cli-operations): One hypequery CLI command for every hypequery Cloud operation, generated from the operations spec. - [Deploy from CI · Cloud](https://hypequery.com/llms.mdx/docs/cloud/deploy-ci): Deploy to hypequery cloud from GitHub Actions on every push. - [Deploy from Python · Cloud](https://hypequery.com/llms.mdx/docs/cloud/deploy-python): Publish Python datasets to hypequery cloud with a deployment bundle and the hypequery CLI. - [Deploy from TypeScript · Cloud](https://hypequery.com/llms.mdx/docs/cloud/deploy-typescript): Publish TypeScript datasets to hypequery cloud with publishToCloud and hypequery deploy. - [Embed chat and dashboards · Cloud](https://hypequery.com/llms.mdx/docs/cloud/embed): Add Hypequery chat, dashboards, or headless analytics workflows to your product with React, an iframe, or the typed client. - [How it works · Cloud](https://hypequery.com/llms.mdx/docs/cloud/how-it-works): How dataset definitions become a hosted hypequery cloud release. - [In-app agents · Cloud](https://hypequery.com/llms.mdx/docs/cloud/in-app-agents): Mint end-user tokens for your own agent locally, with a project signing key, and connect it to the tenant MCP endpoint. - [Logs & usage · Cloud](https://hypequery.com/llms.mdx/docs/cloud/logs-usage): Request logs and execution usage for hypequery cloud. - [MCP · Cloud](https://hypequery.com/llms.mdx/docs/cloud/mcp): Connect AI agents to your hosted hypequery cloud datasets over MCP. - [Portable runtime · Cloud](https://hypequery.com/llms.mdx/docs/cloud/portable-runtime): How UI-authored and cross-language dataset definitions run in hypequery cloud, and the execution capability matrix. - [Python · Cloud](https://hypequery.com/llms.mdx/docs/cloud/python): Query a hypequery cloud dataset from Python and load the rows into a pandas DataFrame. - [Quick start · Cloud](https://hypequery.com/llms.mdx/docs/cloud/quick-start): How onboarding will take you from sign-up to a live hypequery cloud endpoint, once cloud launches. - [React · Cloud](https://hypequery.com/llms.mdx/docs/cloud/react): Typed hooks on published cloud datasets, with each customer seeing only their own rows. - [Releases & rollback · Cloud](https://hypequery.com/llms.mdx/docs/cloud/releases): Every hypequery cloud deploy is an immutable release you can inspect, make live, roll back, and restore. - [REST API · Cloud](https://hypequery.com/llms.mdx/docs/cloud/rest-api): Query hosted hypequery cloud datasets over HTTP. - [Security · Cloud](https://hypequery.com/llms.mdx/docs/cloud/security): How hypequery cloud protects your ClickHouse credentials, your customers' data, and itself. - [Teams · Cloud](https://hypequery.com/llms.mdx/docs/cloud/teams): Invite your team to hypequery cloud and control who can join. ## agents - [Business context](https://hypequery.com/llms.mdx/docs/agents/business-context): Give your analytics agent your KPI definitions, glossary, reporting conventions and data caveats, so it answers ClickHouse questions the way your business means them. - [ClickHouse tools for the Vercel AI SDK: streamText, useChat and MCP](https://hypequery.com/llms.mdx/docs/agents/ai-sdk): Give a Vercel AI SDK agent governed, tenant-scoped ClickHouse analytics with hypequeryTools(), for streamText, generateText and useChat, without an MCP client. - [Tools for your agent](https://hypequery.com/llms.mdx/docs/agents/tools): Give the agent in your product hypequery's tenant-scoped ClickHouse analytics tools, using the Vercel AI SDK, the Anthropic SDK or the OpenAI Agents SDK, from hypequery Cloud or your own backend.