ds_update_task_param
Update a single task's SQL, script, name, or retry parameters in a DolphinScheduler workflow without a full DAG definition. Automates read-modify-write flow with optional offline/online and schedule restoration.
Instructions
Lightweight single-task parameter update — no need to pass full DAG definition.
This tool is a convenience wrapper around ds_modify_workflow_dag's update_task, automatically handling the "read → modify → write → online/offline" flow.
Use case: Change a single task's SQL/script/name/retry params without constructing a full operations list.
Args: project_name: Project name workflow_code: Workflow code task_name: Task name to modify (exact match) updates: Fields to update (flat dict, field names same as update_task's updates) auto_offline: Auto-offline before modification (default True) auto_online: Auto-online after modification (default True) auto_online_schedule: Auto-restore schedule after onlining (default True, v2.0.11)
Supported updates fields (snake_case and camelCase both accepted): Common: name, description, fail_retry_times(failRetryTimes), fail_retry_interval(failRetryInterval), timeout, timeout_flag(timeoutFlag), timeout_notify_strategy(timeoutNotifyStrategy), worker_group(workerGroup), task_priority(taskPriority), delay_time(delayTime), flag SQL: sql, datasource_id(datasource), sql_type, sql_type_select(sqlType), pre_statements(preStatements), post_statements(postStatements), local_params(localParams), resource_list(resourceList) SHELL/PYTHON: script(rawScript), resource_list(resourceList), local_params(localParams)
⚠️ Unrecognized fields are reported in the return value's ignored_fields (not silently dropped).
Returns: { "workflow_code": int, "task_name": str, "schedule_action": str, "status": "updated", }
Examples: # Change a single task's retry params ds_update_task_param( project_name="my_project", workflow_code=21583255237888, task_name="check_partition", updates={"fail_retry_times": 8, "fail_retry_interval": 1} )
# Rename a task (v2.0.11)
ds_update_task_param(
project_name="my_project", workflow_code=..., task_name="old_sql",
updates={"name": "new_sql_v2"}
)
# Change SQL only
ds_update_task_param(
project_name="my_project", workflow_code=..., task_name="sql1",
updates={"sql": "SELECT * FROM new_table WHERE dt='$[yyyyMMdd-1]'"}
)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| updates | Yes | ||
| task_name | Yes | ||
| auto_online | No | ||
| auto_offline | No | ||
| project_name | Yes | ||
| workflow_code | Yes | ||
| auto_online_schedule | No |