ClickHouse Agent answers questions about your data, dltHub brings the data and its meaning

Today we announce the Private Preview of the dltHub ontology for ClickHouse Cloud and ClickHouse Agents. dltHub has also joined House Mates, ClickHouse's official partnership program.

  • Adrian Brudaru

    Co-Founder & CDO

8 min read

Summarize withClaudeChatGPT

Ask two people for last quarter’s revenue, and you can get two numbers. Ask ClickHouse Agent twice, and you can get two numbers. The difference is the definition: what counts as revenue, which table in ClickHouse to trust. Today that definition lives in an agent session, a Jira ticket, a Notion page, or someone’s head, not in ClickHouse. ClickHouse Agent never sees it.

The dltHub ontology puts the definition into ClickHouse, in the table. The agent asks the people who know the business what matters and writes it down as an ontology in your repo: the business concepts and how they relate. dltHub writes each definition into the COMMENT of the ClickHouse table or column it describes. ClickHouse Agent reads those comments before it writes a query, so it answers from your definitions.

ClickHouse Agent answers from the meaning on the tables, not from guesses

Both screenshots show one query in ClickHouse Cloud: the table name and comment of every table in the GitHub dataset.

In the left screenshot, the comment column is empty. ClickHouse Agent has only table names to guess from.

In the right screenshot, each comment carries the ontology. github___commits is a Commit, not linked to pull requests in the data. github___pull_requests is the master source for PullRequest. github___issues_labels is a Label (HAS_LABEL of Issue), one row per label per issue. github___issues notes that issues and pull requests share an endpoint. ClickHouse Agent reads this first, so it knows what the tables mean before it writes SQL.

dltHub brings the data: an agent builds the ClickHouse pipeline from a plain-English request

When users want to ingest data into ClickHouse, they can use dltHub’s AI Harness to build an ingestion pipeline from a plain-English request. The AI Harness can build a pipeline for any REST API, SQL database, or filesystem, and ships with ready-made context for 12k+ sources, so the agent already knows each API’s endpoints, auth, and pagination. That is a big part of why coding agents pick dltHub: more than 260,000 pipelines were created last month by humans and agents. As of October 2026, more than 22,000 companies use dlt in production, including 9% of the Fortune 2000.

Once dltHub has loaded the data into ClickHouse, a ClickHouse agent can query it directly. Ask it for last quarter’s revenue, and it will return a number. But nothing tells the agent what “revenue” means in your business: gross or net, whether refunds count, which date closes the quarter. Without a definition that someone wrote and owns, the agent infers one from table and column names. In other words, it guesses.

The open question is: when an agent answers a business question, which definition should it use?

Deciding where the data’s meaning lives is much more important in the age of agents. The meaning should not only exist, but the agent should be able to reliably find it. The data leaders we speak to usually have to reject two common approaches to handling this issue.

1. Data leaders reject MCP on raw data: in regulated industries such as finance and health, an answer without a written, approved definition is not one they can use

The quickest way to give an agent your data is MCP, a standard way for agents to connect to tools and data. Connect it straight to your raw systems and it can see every table and run any query. Then you ask it for last quarter's revenue: $1.2 million. Ask again, or someone else asks? $1.4 million.

Without a semantic layer, the agent re-reads the source on every question and reinterprets the data from scratch. On raw tables it has to guess what columns and values mean, so the same question can get different answers in different sessions. In finance and healthcare, where precision is a legal requirement, that inconsistency is enough for teams to reject agent answers outright.

For a risk decision or a clinical review, someone has to be able to say where the agent answers came from. The terms are decisions: what counts as “net revenue”, “exposure”, “active patient,” or “readmission” is for the domain owners to decide, and an agent that works it out from column names that don't have definitions made that decision for them.

GxP in life sciences expects data you can trace and trust. BCBS 239 requires banks to show how their risk figures are aggregated and where they come from. The EU AI Act sets data governance and record-keeping requirements for high-risk AI systems.

For these teams, an answer without a traceable definition is not one they can use. They want the definition written down, owned and approved before an agent answers.

2. Data leaders reject an additional governance layer: every definition kept outside the data is a second program to own, audit, and reconcile with the database

A definition in another tool, such a markdown file, Notion/Jira is one more thing to own, review, and audit. In finance and health, that is a high cost. A governance layer is not a tool you switch on. It is a program that has to be run.

Someone has to own the business definitions: every single one needs an owner and an approval status, kept in a second place. Access has to be set up and kept current: who can read, edit, and approve a definition is a second access model, next to the one that already covers the data. Every change needs evidence of who approved what, and when, and auditors check the record in both places. The tool itself goes through security and vendor review. And the two drift apart: the definition in the tool says one thing and the table says another, and someone has to reconcile them every time something changes.

So when an agent builds a pipeline and answers a business question, whose definition does it use?

The definition has to live close to the data: that is where agents can be trusted, and on ClickHouse it is the table comments

The definition can’t be left for the agent to guess, and it can’t live in a second tool. A person writes it, someone approves it, and it sits in the warehouse next to the data, under the same access rules and audit trail.

At dltHub we think the definition belongs in the data warehouse. Last week we showed how dltHub works with Databricks Unity Catalog Pages and Genie Ontology.

On ClickHouse, the proper place is ClickHouse itself.

ClickHouse has a place for meaning built in. Every table and column can carry a comment, a short text that says what it is. And ClickHouse Agent is told to read those comments before it looks at any data. What's missing is someone to write the comments and to keep writing them as the data changes.

That's what dltHub does, in three parts:

1. Agents use dltHub to load the data. A coding agent on your laptop, such as Claude Code, gets the dltHub AI Harness: skills and tools that teach it to build and run pipelines properly. With it, the agent builds a pipeline into ClickHouse and deploys it to the dltHub platform, which runs it on a schedule and loads fresh data into ClickHouse Cloud.

2. The same agent helps to write down what the data means. Instead of a Jira ticket or a Notion page, it asks the people who know the business what matters and writes it down. Humans still own the business concepts; the agent just structures and documents them. It starts with notes on each loaded table, then builds an ontology (the business concepts and how they relate), and finally a canonical data model, or CDM (clean tables built from those definitions). The result is curated context, and agents with curated context give better answers than agents with raw access.

3. dltHub adds definitions to the data and keeps them in ClickHouse. dltHub writes each definition into the comment on its table or column in ClickHouse. The meaning and the pipeline come from the same session and the same repo, and each pipeline run updates the comments if needed. Unlike a Jira ticket, the definition can't fall behind the table, because the code that changes the table also writes it.

dltHub joins Clickhouse House Mates

dltHub has joined House Mates, ClickHouse's official partnership program. In the coming weeks, we will work with the ClickHouse team on many improvements, starting with adding dltHub to the ClickHouse Cloud console and a docs update.

See it: from one prompt to a ClickHouse Agent answering from the ontology

Take a look at how this works end-to-end in ClickHouse with one example question: “How much of our CI is waste?”

From a single prompt, using AI Harness, Thierry builds a dltHub pipeline loading the context alongside the data in ClickHouse table comments. Next, Thierry adds more business definitions by describing what CI waste means to us: superseded, canceled, or timed-out jobs. Based on the business context, dltHub builds and stores an ontology and canonical data model. Finally, Thierry asks the ClickHouse Agent the same question again. This time it reads the comments, finds the new tables, and answers from the ontology’s definition, so every number traces back to the data.

Get access: the Private Preview is open to dltHub and ClickHouse customers

The Private Preview is open to dltHub and ClickHouse customers. If you run ClickHouse and want this on your own definitions, contact us to get access.

Keep reading

All posts