ashb commented on issue #4848: [AIRFLOW-3948] Operator list as templated field issue URL: https://github.com/apache/airflow/pull/4848#issuecomment-470462828 Ah okay, similar but not the same issue. In the specific case of PythonOperator you can do this: ```python def push_value(**kwargs): kwargs['ti'].xcom_push(key='push_key', value=[1, 2, 3]) def do_nothing(ti, **kwargs): mylist = ti.xcom_pull(key='push_key') print(repr(mylist)) return push_task = PythonOperator( task_id='push_task', provider_context=True, dag=dag, python_callable=push_value, ) pull_task = PythonOperator( task_id='pull_task', provide_context=True, dag=dag, python_callable=do_nothing, ) push_task >> pull_task ``` (I know that only works for python operator, and not a general solution.) I think https://issues.apache.org/jira/browse/AIRFLOW-3362 is the way to fix this more generally - that one: works with types other than list, and doesn't need each operator to handle it specifically.
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
