ClickHouse holds the event and product data that answers most "what are users actually doing" questions, at a scale where a careless query hurts. Contextflo connects it to the Claude or ChatGPT your team already uses, with the context that points the AI at the right tables, so product and growth can ask on their own and the data team gets its time back.
How it connects
Contextflo connects as a dedicated ClickHouse user with SELECT on the databases you choose, over the HTTP or HTTPS interface. You enter the host, port, protocol, database, username and password in Contextflo's form, and the credentials are stored encrypted.
Queries run live on your ClickHouse. We never store raw data from your tables, and we don't store query results.
What Contextflo adds
Event data is easy to query and easy to query wrong: the wrong event name, a raw table instead of the rollup, a session definition nobody agreed on. Contextflo lets the team self-serve on it from whichever AI they use:
- Table context. Descriptions of tables and columns, generated from your schema, a code repo or docs, then reviewed by your team. This is where "use the daily rollup, not raw events" gets written down.
- Saved queries and metrics. The agreed SQL for numbers like active users or activation, reused instead of re-derived.
- Group access control. Admins choose which tables each group can query.
- Audit log. Every question and query is logged per person.
Permissions
The ClickHouse grants are the ceiling: Contextflo can only read the databases the user has SELECT on. Inside that, groups in Contextflo narrow which tables each team can query. See access control.
Set it up
- Create a read-only user and grant it
SELECTon the database you want to expose. - Check that Contextflo can reach the HTTP interface: port 8123, or 8443 for HTTPS. On ClickHouse Cloud, use HTTPS on 8443.
- In Contextflo, go to Data Sources, add a ClickHouse connection, and enter the host, port, protocol, database, username and password.
- Pick the tables your team asks about, then ask your first question in Claude or ChatGPT.
FAQ
Is it safe to point an AI at tables with billions of rows?
The user you create has SELECT only, so a query can read but never change your data. Every query runs on your server as that user, so ClickHouse's own limits for the user, such as a maximum execution time or memory per query in a settings profile, apply to it. Saved queries and table context steer the AI toward the right tables and filters, so it does not scan raw event tables to answer a question that a rollup already answers.
What happens to a query Contextflo can't check?
Contextflo reads every query before it runs to see which tables it touches and to apply your access rules. A query it cannot read is blocked rather than run unchecked.
Does it work with ClickHouse Cloud and self-hosted?
Both. For ClickHouse Cloud, use the hostname ending in .clickhouse.cloud with HTTPS on port 8443. For self-hosted, Contextflo connects over the HTTP interface on port 8123, or 8443 for HTTPS, and your server has to accept connections from Contextflo's servers.
Does ClickHouse-specific SQL work?
Yes. Queries run on ClickHouse itself, so the AI can use ClickHouse functions and syntax, and Contextflo reads ClickHouse SQL natively when it checks access.