Classify each statement in a script (DML, DDL, MAINTENANCE, PIPELINE, etc.). Offline AST walk.
/classify <sql>
## Overview `/classify` walks the AST produced by the embedded parser and tags each top-level statement with its execution class: DML, DDL, MAINTENANCE, PIPELINE, QUERY, SESSION, and so on. The result is a table with one row per statement showing the class and the canonical verb. Fully offline. ## Behavior - Input may be a single statement or a semicolon-separated script. Each top-level statement produces one row. - Classes distinguish behavior relevant to orchestration: MAINTENANCE (VACUUM, OPTIMIZE, ANALYZE) is safe to re-run; DML (INSERT, UPDATE, DELETE, MERGE) mutates data; DDL (CREATE, ALTER, DROP) changes schema; PIPELINE declares a pipeline; QUERY is read-only. - Useful when reviewing a submitted script before running it, or when wiring automation that needs to branch on statement type. - Does not check permissions or whether the referenced tables exist. This is a pure AST classification.
/classify VACUUM t; CREATE TABLE u (id INT);
/classify INSERT INTO sales.orders SELECT * FROM raw.events; OPTIMIZE sales.orders
/classify PIPELINE etl_daily SCHEDULE '0 2 * * *' AS (INSERT INTO gold.sales SELECT * FROM silver.sales)