AI-powered text-to-SQL feature in ClickHouse

Mark Needham
This video explores the exciting new AI-powered text-to-SQL feature introduced in ClickHouse 25.7. This nifty addition allows users to generate SQL queries using natural language, making database interactions more intuitive and accessible. We'll walk you through setting it up and demonstrate its capabilities using real-world examples from a UK property price dataset.
Key points covered:
- Setting up the AI-powered text-to-SQL feature with OpenAI or Anthropic API keys
- Exploring available databases and tables using AI-generated queries
- Demonstrating how the AI analyzes schema information to create relevant SQL
- Tips for framing questions to get the most accurate results
This tutorial offers a practical look at how AI can simplify database querying, potentially making ClickHouse more accessible to those less familiar with SQL syntax. Whether you're a seasoned data analyst or just starting with databases, you'll find valuable insights in this demonstration of ClickHouse's latest innovation.
Docs - https://clickhouse.com/docs/use-cases/AI/ai-powered-sql-generation
Recent videos
View all Videos
How to
Inspect incoming data with INSERT … RETURNING in ClickHouse
Use INSERT … RETURNING in ClickHouse 26.11 to inspect generated values, sample incoming rows, find invalid ratings, and summarise an ingestion batch.

How to
Reading and writing Vortex files with ClickHouse (26.11)
Query and export Vortex files with ClickHouse 26.11, using a FineWeb dataset containing just over a million web pages.

