EssKayz opened a new issue, #26619:
URL: https://github.com/apache/airflow/issues/26619
### Description
After the new implementation of "Assigning multiple parameters to a
non-TaskFlow operator" we tried using this for our PythonOperators, but
couldn't get it to work. This is seemingly because a PythonOperator calls the
callable function using `op_kwargs`, and as such anything defined in
`expand_kwargs` doesn't get routed to the python_callable.
### Use case/motivation
We use Airflow quite heavily using PythonOperators, where data flows through
XCom -> it would be really nice to be able to pass over dictionaries from XCom
through op_kwargs using the dynamic task mapping. Currently we are abusing the
PythonOperator's "template_dict" for this purpose, by doing:
```
PythonOperator.partial(...).expand(
templates_dict=XComArg(task)
)
```
This way we can currently get a dictionary from XCom into the
python_callable, and then parsing that into keywords after the fact.
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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]