generate_flink_job
Generate executable Apache Flink SQL from natural language and a schema, then run it on real Flink with sample data to return verified SQL and actual output or errors.
Instructions
Generate an Apache Flink SQL streaming job from a natural-language request and a schema, then RUN it on real Flink against sample data and return the verified SQL plus its actual output (or the Flink error). Use whenever the user wants a Flink streaming job (windowed aggregates, top-N, dedup, interval/temporal joins, filters) — it produces jobs that provably run, unlike hand-written SQL. Supply representative sample rows.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"request": "<request>",
"sources": "<sources>",
"sample_data": "<sample_data>"
},
"name": "generate_flink_job"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes | Plain-English job description. | |
| sources | Yes | Source tables. Each: name, columns [[name, flinkType], ...], event_time (column), watermark_delay_seconds, optional primary_key. | |
| sample_data | Yes | Map of source name -> list of row objects. TIMESTAMP columns may be integer seconds (offset from a base) or a 'yyyy-MM-dd HH:mm:ss.SSS' string. |