Skip to content

Levels

Compare
Choose a tag to compare
@chriscardillo chriscardillo released this 31 Dec 15:28
77887f0

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's TaskGroup class
    • wait_for_defaults accepts a dictionary of parameters that could be passed to Airflow's ExternalTaskSensor class
    • latest_only is a boolean that will put a LatestOnlyOperator 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 with METADATA.yml files - at both the DAG level and the task group level
  • By default, TaskGroup parameter prefix_group_id is set to False, 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 in task_group_defaults or METADATA.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 to create_dag function, or in METADATA.yml.

All operator dispatching still works exactly the same. gusty 0.3.0 is compatible with Airflow 1.x.