Blueprints
Blueprint: analytics / text-to-SQL agent
Questions in plain language, answers from the warehouse — read-only and explainable.
What it is and why it exists
Schema and semantic-layer retrieval, SQL generation, validation and safe execution, then a short explanation with the query shown. Often an agent loop that inspects results and refines.
Quick prototype
Whole schema in the prompt, run whatever comes back.
In production, at scale
Semantic layer definitions, table retrieval, SQL linting and allow-lists, read-only role with RLS, limits and timeouts, eval set of question → expected result, and query logs for review.
Vendors and tools
| Snowflake Cortex Analyst / Databricks Genie / Vanna | Products and frameworks |
|---|
On AWS: Amazon Q in QuickSight; Bedrock Knowledge Bases structured retrieval over Redshift.
How it fails
- Wrong definition of a business metric
- A query that scans the whole warehouse
What the interviewer asks next
How do you evaluate text-to-SQL?
Execute generated and reference queries and compare result sets (not SQL strings), on a set of real questions with known answers.