Analyze query results with LLM based on a prompt
Table-in, table-out — composes downstream of SELECTs.
THEN ANALYZE {{ prompt }}THEN ANALYZE({{ prompt }})| name | type | description |
|---|---|---|
| prompt | VARCHAR | — |
| _table | TABLE | — |
Returns structured analysis rows with the expected schema
SELECT
*
FROM
(
VALUES
('A', 100),
('B', 50)
) AS t (category, sales) THEN
ANALYZE ('Which category has higher sales?') THEN PYTHON (
'result = pd.DataFrame({"ok":[set(["finding","category","detail"]).issubset(df.columns)]})'
)Apply theme styling to a chart specification
Remove duplicate rows
Add LLM-computed columns to query results
Filter query results using LLM-based semantic matching
Group by column and aggregate another
Investigative analysis - explores related data to answer questions
Analyze query results with LLM based on a prompt
Table-in, table-out — composes downstream of SELECTs.
THEN ANALYZE {{ prompt }}THEN ANALYZE({{ prompt }})| name | type | description |
|---|---|---|
| prompt | VARCHAR | — |
| _table | TABLE | — |
Returns structured analysis rows with the expected schema
SELECT
*
FROM
(
VALUES
('A', 100),
('B', 50)
) AS t (category, sales) THEN
ANALYZE ('Which category has higher sales?') THEN PYTHON (
'result = pd.DataFrame({"ok":[set(["finding","category","detail"]).issubset(df.columns)]})'
)Apply theme styling to a chart specification
Remove duplicate rows
Add LLM-computed columns to query results
Filter query results using LLM-based semantic matching
Group by column and aggregate another
Investigative analysis - explores related data to answer questions