surfaceq & aask_data
Q & Ascalar · returns json

ASK_DATA

Answer plain-English questions about your data by writing and running SQL

Per-row — runs once for each row.

qallmtextpipeline-composable

Syntax

ASK_DATA('{{ question }}')

Arguments

nametypedescription
questionVARCHARNatural language question about your data

About

Ask questions about your data in plain English and get rows back as the answer. The operator introspects your attached databases, writes the SQL for you, runs it, and returns the result set. Useful when you or a non-technical user knows what you want to know but doesn't want to hand-write the SQL — dashboards drilling on an ad-hoc question, quick exploratory checks, report generation driven by a prompt, or giving a business analyst a Q&A interface over a catalog. Results come back as a JSON array of row objects. Only SELECT statements are generated and executed; schema changes and writes are blocked before the query runs, so it's safe to expose to non-admins. Two related operators: ASK_DATA(question) — this one: runs the generated SQL, returns rows ask_data_sql(question) — returns the generated SQL only, useful for debugging or review before running

Examples

Simple passthrough query returns value

SELECT
  *
FROM
  ask_data ('select 1 as test')

Nearby rabbit holes

same domain
Climb back to The Looking Glass