Levels
gusty 0.3.0 provides full support for Airflow 2.x task groups, and replaces GustyDAG
with create_dag
, a function that works just like the GustyDAG
class, and still hands users back an Airflow DAG, but is much more flexible.
create_dag
provides the following functionality:
- Ability to provide defaults for the DAG, task groups, and external task sensors ("wait for" tasks)
task_group_defaults
accepts a dictionary of any parameters that could be passed to Airflow'sTaskGroup
classwait_for_defaults
accepts a dictionary of parameters that could be passed to Airflow'sExternalTaskSensor
classlatest_only
is a boolean that will put aLatestOnlyOperator
at the root of the DAG- all other (valid) keyword arguments provided will be passed to Airflow's DAG class
- Ability to override any defaults set in
create_dag
withMETADATA.yml
files - at both the DAG level and the task group level - By default, TaskGroup parameter
prefix_group_id
is set toFalse
, and when enabled, task dependencies will also check for adjusted prefixed task ids automatically for setting dependencies. - Support for
suffix_group_id
for task groups. Can be set intask_group_defaults
orMETADATA.yml
. A gusty exclusive feature! latest_only
no longer needs to be set in DAG's default args, can be defined on top-level call tocreate_dag
function, or inMETADATA.yml
.
All operator dispatching still works exactly the same. gusty 0.3.0 is compatible with Airflow 1.x.