di-agent-flow-datastage
Author and Edit DataStage Flows with the SDK
Routing lives elsewhere. Whether a request should be authored here or in pyflow, and whether it is a create or an edit, is decided by the
di-agent-flow-lifecycleskill (AUTHOR state). This file is the SDK reference and the mechanics of using it. Before working with flows, you must fully understand thedi-agent-flow-lifecycleskill. Do not write any SDK code before loading the lifecycle skills.
DataStage batch flows are written as SDK-style Python code and submitted via update_datastage_flow (edit an existing flow in place) or create_datastage_flow (create a new one). Auth, project context, and persistence are handled automatically.
The SDK reaches the whole engine stage catalog, including everything pyflow has no form for. That reach is also its cost: it needs exact stage types, property names, and enum values, which is why the router treats it as the escape hatch rather than the default.
Both tools compile the flow as part of the call. If it does not compile, the result comes back with status: "compile_error" plus flow_id, flow_link, and a per-stage compile_errors list — and the flow is still saved. Fix it with update_datastage_flow on that same flow_id. Never create a new flow and never delete the broken one; the id is what you edit against.
Where to look
- SDK conventions (method signatures, stage config, link schemas, column types, connection binding, key rules, full example) → references/sdk-conventions.md
- Stage selection →
recommend_datastage_stages(subutterances=[...]) - Stage property names and accepted values →
datastage_property_lookup(requests=[{"stage": "..."}]) - Per-stage deep-dive →
di-agent-knowledge-engine-datastageskill stages/ - Flow optimization →
di-agent-knowledge-engine-datastageskill optimization/overview.md - Custom stages (C/C++, Java) → BuildopStage.md, JavaIntegrationStage.md
- Transformer stage expressions →
di-agent-knowledge-engine-datastageskill resourcestages/TransformerStageFunctions/TransformerStageFunctionsOverview.md