generate_pipeline_sql
Generate pipeline SQL by submitting your exact instruction to the data engineering agent, which handles review steps, clarification questions, and saving to a version.
Instructions
Ask the Data Engineering agent to write pipeline SQL.
Branch on outcome, do not assume:
"review_required" - the usual case. Print
review_promptverbatim - it is already formatted with numbers. Do not renumber, reformat, or drop the numbers, and do not recommend which tables to keep: the selection is the user's, and a recommendation defeats the point of the review. Then ALSO offer the same numbered tables (plus "keep all") through the client's selection UI and wait - the verbatim rule governs the printed text, and offering those options as a selection does not violate it. Wait on a typed reply only if the client has no selection UI. Then call approve_table_selection with the same session_id. Iftarget_is_also_a_sourceis non-empty, the pipeline would write over a table it reads from - surface that and get explicit confirmation."sql_generated" - the agent skipped the review and wrote SQL immediately. If you passed save_to_version_id it is already saved; just report the
savedreceipt."needs_clarification" - the agent needs more detail. Relay
questionsto the user verbatim, offering the answers as a selection where the options are enumerable, then call this tool again with the SAMEsession_idand their answers as the instruction. Do not answer on their behalf and do not invent a definition for an ambiguous term.
Pass save_to_version_id (the pipeline's version_id) so that if SQL arrives on this turn it is saved without a round trip.
instruction must be the user's request VERBATIM - their exact wording, not a rephrasing.
Do not add table names, columns, joins, grain or dialect hints they did not write: the
knowledge cluster's own instructions already supply those, and rewriting the request changes
what the platform's agent generates.
Do not validate generated SQL against table metadata, and do not summarise it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | No | ||
| instruction | Yes | ||
| pipeline_id | Yes | ||
| save_to_version_id | No | ||
| knowledge_cluster_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||