Dag Dag

yaml
type: "io.kestra.plugin.core.flow.Dag"

Create a directed acyclic graph (DAG) of tasks without explicitly specifying the order in which the tasks need to run.

List your tasks and their dependencies, and Kestra will figure out the execution sequence. Each task can only depend on other tasks from the DAG task. For technical reasons, low-code interaction via UI forms is disabled for now when using this task.

Examples

Run a series of tasks for which the execution order is defined by their upstream dependencies.

yaml
id: dag_flow
namespace: company.team
tasks:
  - id: dag
    type: io.kestra.plugin.core.flow.Dag
    tasks:
      - task:
          id: task1
          type: io.kestra.plugin.core.log.Log
          message: task 1
      - task:
          id: task2
          type: io.kestra.plugin.core.log.Log
          message: task 2
        dependsOn:
          - task1
      - task:
          id: task3
          type: io.kestra.plugin.core.log.Log
          message: task 3
        dependsOn:
          - task1
      - task:
          id: task4
          type: io.kestra.plugin.core.log.Log
          message: task 4
        dependsOn:
          - task2
      - task:
          id: task5
          type: io.kestra.plugin.core.log.Log
          message: task 5
        dependsOn:
          - task4
          - task3

Properties

concurrent

  • Type: integer
  • Dynamic:
  • Required: ✔️
  • Default: 0

Number of concurrent parallel tasks that can be running at any point in time.

If the value is 0, no concurrency limit exists for the tasks in a DAG and all tasks that can run in parallel will start at the same time.

tasks

  • Type: array
  • SubType: Dag-DagTask
  • Dynamic:
  • Required: ✔️
  • Min items: 1

errors

  • Type: array
  • SubType: Task
  • Dynamic:
  • Required:

List of tasks to run if any tasks failed on this FlowableTask.

Definitions

io.kestra.plugin.core.flow.Dag-DagTask

Properties

task
  • Type: Task
  • Dynamic:
  • Required: ✔️

The task within the DAG.

dependsOn
  • Type: array
  • SubType: string
  • Dynamic:
  • Required:

The list of task IDs that should have been successfully executed before starting this task.

Was this page helpful?