I have airflow version 2.6.0 and python version 3.9.2. I am following the official tutorial of Dynamic Task Mapping and I am using the example code for a dag:
from __future__ import annotations
from datetime import datetime
from airflow import DAG
from airflow.decorators import task
with DAG(dag_id="example_dynamic_task_mapping", start_date=datetime(2022, 3, 4)) as dag:
@task
def add_one(x: int):
return x + 1
@task
def sum_it(values):
total = sum(values)
print(f"Total was {total}")
added_values = add_one.expand(x=[1, 2, 3])
sum_it(added_values)
Even though the dag runs sucessfully, the interface shows "No Data Found", as it can be seen in this print Why isn't it possible to see the output as it is shown in the tutorial?
I have tried updating the airflow to the current stable version (which is now 2.6.0) and tried to use the exact same code from the example, but it still does not work.