Lee-W commented on issue #49376:
URL: https://github.com/apache/airflow/issues/49376#issuecomment-3092405184
```python
from __future__ import annotations
from datetime import datetime
from airflow.sdk import dag, task, task_group
@task
def _multi_param_task(
*,
str_param_1: str,
str_param_2_with_default: str = "default",
int_param_3: int,
) -> dict[str, str]:
return {
"param_1": str_param_1,
"param_2": str_param_2_with_default,
"param_3": int_param_3,
}
@task_group
def _multi_param_task_group(
*,
str_param_1: str,
str_param_2_with_default: str = "default",
int_param_3: int,
) -> dict[str, str]:
return _multi_param_task(
str_param_1=str_param_1,
str_param_2_with_default=str_param_2_with_default,
int_param_3=int_param_3,
)
@dag(
start_date=datetime(2025, 1, 1),
schedule=None,
)
def dynamic_task_dag() -> None:
_multi_param_task_group.partial(
str_param_1="task group dynamically-mapped with expand_kwargs",
).expand_kwargs(
[
{"int_param_3": 621},
{"int_param_3": 926},
]
)
dynamic_task_dag()
```
verified with this Dag
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]