GCSToGCSOperator source_objects failing to parse xcom #42638
Replies: 2 comments
-
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval. |
Beta Was this translation helpful? Give feedback.
-
You are not supposed to pass task results (which are dynamic) as initialization parameters in classic operator. This is not going to work - in classic operators the only way to get parameters dynamically resolved during execution is to use jinja templates. If you want to pass the list, you need to pass it as jinja template where you pull parameters from xcom and use "render as native object". Or you can write what GCS to GCS operator does using hooks in taskflow-annotated task similarly to what is described in https://medium.com/apache-airflow/generic-airflow-transfers-made-easy-5fe8e5e7d2c2 |
Beta Was this translation helpful? Give feedback.
-
Apache Airflow Provider(s)
google
Versions of Apache Airflow Providers
10.15.0
Apache Airflow version
2.7.3
Operating System
debian
Deployment
Astronomer
Deployment details
Using astro runtime 9.15.0
What happened
The GCSToGCSOperator is throwing an error when trying to pass task output into the
source_objects
field.What you think should happen instead
This operator should be able to handle xcom, and we have no issue using the
GCSToBigQueryOperator
in the same wayHow to reproduce
Anything else
No response
Are you willing to submit PR?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions