Skip to content

Configuring Your Workflows

DAG Factory allows you to define workflows in a structured, configuration-driven way using YAML files. You can define multiple workflows within a single YAML file based on your requirements.

Key Elements of Workflow Configuration

  • dag_id: Unique identifier for your DAG.
  • default_args: Common arguments for all tasks.
  • schedule/schedule_interval: Specifies the execution schedule.
  • tasks: Defines the Airflow tasks in your workflow.

Example DAG Configuration

example_dag_factory.yml
basic_example_dag:
  default_args:
    owner: "custom_owner"
  description: "this is an example dag"
  schedule_interval: "0 3 * * *"
  render_template_as_native_obj: True
  tasks:
    task_1:
      operator: airflow.operators.bash_operator.BashOperator
      bash_command: "echo 1"
    task_2:
      operator: airflow.operators.bash_operator.BashOperator
      bash_command: "echo 2"
      dependencies: [task_1]
    task_3:
      operator: airflow.operators.bash_operator.BashOperator
      bash_command: "echo 2"
      dependencies: [task_1]

Check out more configuration params