airflow_config.DagArgs

pydantic model airflow_config.DagArgs[source]

Bases: BaseModel

Show JSON schema
{
   "title": "DagArgs",
   "type": "object",
   "properties": {
      "description": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The description for the DAG to e.g. be shown on the webserver",
         "title": "Description"
      },
      "schedule": {
         "anyOf": [
            {
               "format": "duration",
               "type": "string"
            },
            {
               "$ref": "#/$defs/RelativeDeltaAnnotation"
            },
            {
               "const": "NOTSET",
               "type": "string"
            },
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Defines the rules according to which DAG runs are scheduled. Can accept cron string, timedelta object, Timetable, or list of Dataset objects. If this is not provided, the DAG will be set to the default schedule timedelta(days=1). See also Customizing DAG Scheduling with Timetables.",
         "title": "Schedule"
      },
      "start_date": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "maxItems": 2,
               "minItems": 2,
               "prefixItems": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "string"
                  }
               ],
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The timestamp from which the scheduler will attempt to backfill",
         "title": "Start Date"
      },
      "end_date": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "maxItems": 2,
               "minItems": 2,
               "prefixItems": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "string"
                  }
               ],
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "A date beyond which your DAG won\u2019t run, leave to None for open-ended scheduling",
         "title": "End Date"
      },
      "max_active_tasks": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "the number of task instances allowed to run concurrently",
         "title": "Max Active Tasks"
      },
      "max_active_runs": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "maximum number of active DAG runs, beyond this number of DAG runs in a running state, the scheduler won\u2019t create new active DAG runs",
         "title": "Max Active Runs"
      },
      "default_view": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Specify DAG default view (grid, graph, duration, gantt, landing_times), default grid",
         "title": "Default View"
      },
      "orientation": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Specify DAG orientation in graph view (LR, TB, RL, BT), default LR",
         "title": "Orientation"
      },
      "catchup": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Perform scheduler catchup (or only run latest)? Defaults to False",
         "title": "Catchup"
      },
      "is_paused_upon_creation": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Specifies if the dag is paused when created for the first time. If the dag exists already, this flag will be ignored.",
         "title": "Is Paused Upon Creation"
      },
      "tags": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "description": "List of tags to help filtering DAGs in the UI.",
         "title": "Tags"
      },
      "dag_display_name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The display name of the DAG which appears on the UI.",
         "title": "Dag Display Name"
      }
   },
   "$defs": {
      "RelativeDeltaAnnotation": {
         "properties": {
            "years": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Years"
            },
            "months": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Months"
            },
            "days": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Days"
            },
            "hours": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Hours"
            },
            "minutes": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Minutes"
            },
            "seconds": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Seconds"
            },
            "microseconds": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Microseconds"
            },
            "year": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Year"
            },
            "month": {
               "anyOf": [
                  {
                     "maximum": 12,
                     "minimum": 1,
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Month"
            },
            "day": {
               "anyOf": [
                  {
                     "maximum": 31,
                     "minimum": 0,
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Day"
            },
            "hour": {
               "anyOf": [
                  {
                     "maximum": 23,
                     "minimum": 0,
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Hour"
            },
            "minute": {
               "anyOf": [
                  {
                     "maximum": 59,
                     "minimum": 0,
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Minute"
            },
            "second": {
               "anyOf": [
                  {
                     "maximum": 59,
                     "minimum": 0,
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Second"
            },
            "microsecond": {
               "anyOf": [
                  {
                     "maximum": 999999,
                     "minimum": 0,
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Microsecond"
            },
            "weekday": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/WeekdayAnnotations"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "leapdays": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Leapdays"
            },
            "yearday": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Yearday"
            },
            "nlyearday": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Nlyearday"
            },
            "weeks": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Weeks"
            },
            "dt1": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Dt1"
            },
            "dt2": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Dt2"
            }
         },
         "title": "RelativeDeltaAnnotation",
         "type": "object"
      },
      "WeekdayAnnotations": {
         "properties": {
            "weekday": {
               "maximum": 6,
               "minimum": 0,
               "title": "Weekday",
               "type": "integer"
            },
            "n": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "N"
            }
         },
         "required": [
            "weekday"
         ],
         "title": "WeekdayAnnotations",
         "type": "object"
      }
   }
}

Fields:
  • catchup (bool | None)

  • dag_display_name (str | None)

  • default_view (str | None)

  • description (str | None)

  • end_date (datetime.datetime | Tuple[datetime.datetime, str] | None)

  • is_paused_upon_creation (bool | None)

  • max_active_runs (int | None)

  • max_active_tasks (int | None)

  • orientation (str | None)

  • schedule (datetime.timedelta | dateutil.relativedelta.relativedelta | Literal['NOTSET'] | str | None)

  • start_date (datetime.datetime | Tuple[datetime.datetime, str] | None)

  • tags (List[str] | None)

field description: str | None = None

The description for the DAG to e.g. be shown on the webserver

field schedule: timedelta | Annotated[relativedelta, RelativeDeltaAnnotation] | Literal['NOTSET'] | str | None = None

Defines the rules according to which DAG runs are scheduled. Can accept cron string, timedelta object, Timetable, or list of Dataset objects. If this is not provided, the DAG will be set to the default schedule timedelta(days=1). See also Customizing DAG Scheduling with Timetables.

field start_date: Annotated[datetime | Tuple[datetime, str], AfterValidator(func=_datetime_or_datetime_and_timezone)] | None = None

The timestamp from which the scheduler will attempt to backfill

field end_date: Annotated[datetime | Tuple[datetime, str], AfterValidator(func=_datetime_or_datetime_and_timezone)] | None = None

A date beyond which your DAG won’t run, leave to None for open-ended scheduling

field max_active_tasks: int | None = None

the number of task instances allowed to run concurrently

field max_active_runs: int | None = None

maximum number of active DAG runs, beyond this number of DAG runs in a running state, the scheduler won’t create new active DAG runs

field default_view: str | None = None

Specify DAG default view (grid, graph, duration, gantt, landing_times), default grid

field orientation: str | None = None

Specify DAG orientation in graph view (LR, TB, RL, BT), default LR

field catchup: bool | None = None

Perform scheduler catchup (or only run latest)? Defaults to False

field is_paused_upon_creation: bool | None = None

Specifies if the dag is paused when created for the first time. If the dag exists already, this flag will be ignored.

field tags: List[str] | None [Optional]

List of tags to help filtering DAGs in the UI.

field dag_display_name: str | None = None

The display name of the DAG which appears on the UI.