com um clique
gen-table
// Create database tables from SQL (CTAS) or natural language descriptions
// Create database tables from SQL (CTAS) or natural language descriptions
Generate MetricFlow metrics from natural language business descriptions
Generate MetricFlow semantic models from database tables with validation and Knowledge Base publishing
Activate when the gen_job agent detects that the source and target databases differ. Covers cross-database transfer lifecycle - type mapping via adapter Mixin hints, DDL generation, data transfer via transfer_query_result, and lightweight reconciliation.
Execution guide for Airflow scheduled jobs — troubleshooting, updating, conn_id conventions, and cron references
Scheduler validator driven by ValidationHook — read-only static verification of scheduled jobs (schedule correctness, configuration, runtime context already collected by deterministic hook). Does not trigger test runs.
Create, view, and manage Grafana dashboards with panels and datasources
| name | gen-table |
| description | Create database tables from SQL (CTAS) or natural language descriptions |
| tags | ["wide-table","CTAS","DDL","create-table","query-acceleration"] |
| version | 1.0.0 |
| user_invocable | false |
| disable_model_invocation | false |
| allowed_agents | ["gen_table","gen_job"] |
ask_user is available, use it for DDL confirmation and clarification.ask_user is not available (workflow, batch, or print mode), never call ask_user and never wait for user input. Treat the original request as authorization only for the specific non-destructive CREATE TABLE / CTAS it explicitly asks for.ask_user is unavailable, stop and report exactly what is missing.If the user selects "Cancel" at ANY point (any ask_user response), you MUST immediately stop ALL work. Do NOT:
Return immediately with:
{"table_name": "", "output": "Cancelled by user."}
Detect input mode:
The user's SQL already fully defines the output schema. Do NOT ask the user about table usage, purpose, or column selection — the SQL is the spec.
describe_table for each source table to understand column types.read_query with LIMIT 10 to validate the query output.wide_order_customer). If the user specified a name, use it.Natural language is ambiguous, so clarification may be needed before generating DDL.
describe_table for any referenced existing tables to infer column types.ask_user when available. If ask_user is unavailable, stop and report the missing fields instead of guessing.Generate the exact DDL SQL statement.
Generate CTAS: CREATE TABLE {schema}.{table_name} AS ({select_sql})
Generate: CREATE TABLE {schema}.{table_name} ({column_defs})
ask_user is available — DDL ConfirmationCall ask_user with the complete DDL embedded in the question:
ask_user(questions=[{
"question": "Generated DDL:\n\nCREATE TABLE {schema}.{table_name} AS (\n SELECT ...\n);\n\nConfirm execution?",
"options": ["Execute", "Modify", "Cancel"]
}])
Formatting rules for the question text:
\n for line breaks to keep the SQL readableBased on user response:
ask_user again with the updated DDL{"table_name": "", "output": "Cancelled by user."}. Do NOT continue.ask_user is unavailable — Workflow Authorizationask_user.DROP, ALTER, TRUNCATE, CREATE OR REPLACE, or any existing-object replacement, require explicit authorization in the original request. Otherwise stop and report the required authorization.execute_ddl(sql) with the confirmed or workflow-authorized DDL statement.read_query("SELECT COUNT(*) FROM {schema}.{table_name}") to confirm row countdescribe_table("{schema}.{table_name}") to confirm schema matchesdescribe_table("{schema}.{table_name}") to confirm the created schema.If DDL fails:
ask_user is available, fix the SQL, show the updated DDL to the user via ask_user, and retry (up to 3 attempts)ask_user is unavailable, fix and retry directly up to 3 attempts when the intent remains the same and no new destructive action is introducedOutput a summary including:
task(type="gen_semantic_model", prompt="{table_name}")ask_user before executing DDL only when the tool is available.ask_user confirmation when interactive, or in the final output when workflow mode executes.gen_semantic_model