I have a custom defined Operator my_previous_job
in Airflow that returns a Python list.
In my DAG definition, I reference it using jinja template:
t_my_job = MyOperator(
data=json.dumps({
"jobId": f"{{{{ ti.xcom_pull(task_ids='my_previous_job', "f"key='return_value')}}}}",
})
)
However, the value the f"{{{{ (ti.xcom_pull(task_ids='my_previous_job', "f"key='return_value')}}}})"
returns is not a list, but a string with a list in it. i.e.
Instead of:
['a','b','c']
it returns a string:
"['a','b','c']"
What can I do to just get the list generated by the my_previous_job
instead of a String?