TaskDefinition

A task node in a DolphinScheduler workflow definition DAG.

ApacheDAGData PipelineOpen SourceOrchestrationPythonSchedulingWorkflow

Properties

Name Type Description
id integer Task definition ID.
code integer Globally unique task code.
name string Task name within the workflow.
taskType string Task execution type.
taskParams object Task-specific parameters (structure varies by taskType).
description string Task description.
flag string Whether this task is enabled.
taskPriority string Task priority for scheduling.
workerGroup string Worker group this task should run on.
retryTimes integer Number of retry attempts on failure.
retryInterval integer Interval in minutes between retry attempts.
timeout integer Task execution timeout in minutes.
View JSON Schema on GitHub

JSON Schema

apache-dolphinscheduler-task-definition-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/apache-dolphinscheduler/refs/heads/main/json-schema/apache-dolphinscheduler-task-definition-schema.json",
  "title": "TaskDefinition",
  "description": "A task node in a DolphinScheduler workflow definition DAG.",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "Task definition ID.",
      "example": 2001
    },
    "code": {
      "type": "integer",
      "description": "Globally unique task code.",
      "example": 9999999999999
    },
    "name": {
      "type": "string",
      "description": "Task name within the workflow.",
      "example": "extract-sales-data"
    },
    "taskType": {
      "type": "string",
      "description": "Task execution type.",
      "enum": [
        "SHELL",
        "SQL",
        "SPARK",
        "FLINK",
        "PYTHON",
        "HTTP",
        "DATAX",
        "SEATUNNEL",
        "JUPYTER",
        "PYTORCH",
        "CONDITIONS",
        "SWITCH",
        "SUB_PROCESS",
        "DEPENDENT"
      ],
      "example": "SPARK"
    },
    "taskParams": {
      "type": "object",
      "description": "Task-specific parameters (structure varies by taskType)."
    },
    "description": {
      "type": "string",
      "description": "Task description.",
      "example": "Extract daily sales data from source database"
    },
    "flag": {
      "type": "string",
      "description": "Whether this task is enabled.",
      "enum": [
        "YES",
        "NO"
      ],
      "default": "YES",
      "example": "YES"
    },
    "taskPriority": {
      "type": "string",
      "description": "Task priority for scheduling.",
      "enum": [
        "HIGHEST",
        "HIGH",
        "MEDIUM",
        "LOW",
        "LOWEST"
      ],
      "example": "MEDIUM"
    },
    "workerGroup": {
      "type": "string",
      "description": "Worker group this task should run on.",
      "default": "default",
      "example": "default"
    },
    "retryTimes": {
      "type": "integer",
      "description": "Number of retry attempts on failure.",
      "minimum": 0,
      "default": 0,
      "example": 3
    },
    "retryInterval": {
      "type": "integer",
      "description": "Interval in minutes between retry attempts.",
      "default": 1,
      "example": 5
    },
    "timeout": {
      "type": "integer",
      "description": "Task execution timeout in minutes.",
      "default": 0,
      "example": 30
    }
  },
  "required": [
    "name",
    "taskType"
  ]
}