alibabacloud-dataworks-datastudio-develop
DataWorks Data Development
⚡ MANDATORY: Read Before Any API Call
These absolute rules are NOT optional — violating ANY ONE means the task WILL FAIL:
-
FIRST THING: Switch CLI profile. Before ANY
aliyuncommand, runaliyun configure list. If multiple profiles exist, runaliyun configure switch --profile <name>to select the correct one. Priority: prefer a profile whose name containsdataworks(case-insensitive); otherwise usedefault. Do NOT skip this step. Do NOT run anyaliyun dataworks-publiccommand before switching. NEVER read/echo/print AK/SK values. -
NEVER install plugins. If
aliyun helpshows "Plugin available but not installed" for dataworks-public → IGNORE IT. Do NOT runaliyun plugin install. PascalCase RPC works without plugins (requires CLI >= 3.3.1). -
ONLY use PascalCase RPC. Every DataWorks API call must look like:
aliyun dataworks-public CreateNode --ProjectId ... --Spec '...'. Never use kebab-case (create-file,create-node,create-business). -
ONLY use these APIs for create:
CreateWorkflowDefinition→CreateNode(per node, with--ContainerId) →CreatePipelineRun(to deploy). -
ONLY use these APIs for update:
UpdateNode(incremental,kind:Node) →CreatePipelineRun(to deploy). Never useImportWorkflowDefinition,DeployFile, orSubmitFilefor updates or publishing. 4a. ONLY use these APIs for deploy/publish:CreatePipelineRun(Type=Online, ObjectIds=[ID]) →GetPipelineRun(poll) →ExecPipelineRunStage(advance). NEVER useDeployFile,SubmitFile,ListDeploymentPackages, orGetDeploymentPackage— these are all legacy APIs that will fail. -
If
CreateWorkflowDefinitionorCreateNodereturns an error, FIX THE SPEC — do NOT fall back to legacy APIs. Error 58014884415 means your FlowSpec JSON format is wrong (e.g., used"kind":"Workflow"instead of"kind":"CycleWorkflow", or"apiVersion"instead of"version"). Copy the exact Spec from the Quick Start below. -
Run CLI commands directly — do NOT create wrapper scripts. Never create
.shscripts to batch API calls. Run eachaliyuncommand directly in the shell. Wrapper scripts add complexity and obscure errors. -
Saving files locally is NOT completion. The task is only done when the API returns a success response (e.g.,
{"Id": "..."}fromCreateWorkflowDefinition/CreateNode). Writing JSON files to disk without calling the API means the workflow/node was NOT created. Never claim success without a real API response. -
NEVER simulate, mock, or fabricate API responses. If credentials are missing, the CLI is misconfigured, or an API call returns an error — report the exact error message to the user and STOP. Do NOT generate fake JSON responses, write simulation documents, echo hardcoded output, or claim success in any form. A simulated success is worse than an explicit failure.
-
Credential failure = hard stop. If
aliyun configure listshows empty or invalid credentials, or any CLI call returnsInvalidAccessKeyId,access_key_id must be assigned, or similar auth errors — STOP immediately. Tell the user to configure valid credentials outside this session. Do NOT attempt workarounds (writing config.json manually, using placeholder credentials, proceeding without auth). No subsequent API calls may be attempted until credentials are verified working. -
ONLY use APIs listed in this document. Every API you call must appear in the API Quick Reference table below. If you need an operation that is not listed, check the table again — the operation likely exists under a different name. NEVER invent API names (e.g.,
CreateDeployment,ApproveDeployment,DeployNodedo NOT exist). If you cannot find the right API, ask the user.