Database Analytics (ClickHouse)
Last updated
Was this helpful?
Last updated
Was this helpful?
Demonstrates how a product manager can directly ask natural language questions to a ClickHouse database to get LLM usage insights. This use case showcases LangDB’s ability to translate plain queries into structured SQL and return visual or tabular outputs in real-time.
Ask natural language questions about flight operations, delays, and patterns from the dataset, such as:
"What is the number of flights per day from the year 2000 to 2008"
"How many flights delayed by more than 10 minutes, grouped by the day of the week, for 2000-2008"
"What are the total number of delays"
An AI agent interprets your question, generates optimized ClickHouse SQL, and returns a clean, structured result.
To connect an AI agent to your ClickHouse database, the following environment variables must be configured:
Variable
Description
clickhouse_host
ClickHouse server hostname
clickhouse_port
ClickHouse server port
clickhouse_user
ClickHouse username
clickhouse_password
ClickHouse password
clickhouse_secure
Whether to use TLS
clickhouse_verify
Whether to verify TLS certificates
clickhouse_connect_timeout
Connection timeout (seconds, optional)
clickhouse_send_receive_timeout
Send/receive timeout (seconds, optional)
Credentials are securely stored and encrypted. Never share them externally.
Output
Product teams can ask questions directly to the database.
No SQL writing required — just ask and analyze.
Enables faster decision-making around usage trends and cost controls.
Checkout Clickhouse MCP Server: