.partial()はすべてのコピーで同じ引数を設定し、.expand()は変わる引数を設定します:
count_status.partial(status="failed_attempt").expand(depot=depots())
expandに2つの引数を渡すと、Airflowはすべての組み合わせを作ります:expand(depot=["leeds", "york"], status=["delivered", "failed_attempt"])は4つのコピーを作ります。代わりに値を組にするには、コピーごとに1つの辞書のリストをexpand_kwargsに渡してください:
is_late.expand_kwargs([{"depot": "leeds", "cutoff": "06:00"}, {"depot": "york", "cutoff": "06:30"}])
リストはタスクから来ることもでき、それが通常の場合です。従来のオペレーターも、オペレーターの引数をpartialに入れて、同じようにマッピングします:BashOperator.partial(task_id="archive").expand(bash_command=commands()). task_id、retries、poolは決してマッピングできません。TaskFlowのタスクでは、retriesのようなオペレーターの引数はデコレーターに入れてください。