A task group collects tasks under a name in the Graph and prefixes their ids: inside TaskGroup("north") a task extract becomes north.extract. Groups make repeated shapes readable and give each copy unique ids. Create them with with TaskGroup(group_id="north"): or the @task_group decorator; a group can sit on either side of >>.
Setup and teardown tasks wrap work that needs a resource: create a temporary table, use it, drop it. Mark them with @setup and @teardown (from airflow.sdk) and pair them with .as_teardown(setups=...). The teardown runs when the work is done, even if it failed, as long as its setup succeeded. Unlike an all_done cleanup, a teardown is ignored when Airflow decides the run's state, so a failed load still fails the run.
The teardown always cleans up, and the run still reports the load's failure.