Hi,
I want to get the result of one task t1, inside task t2.
I have set the result of t1, by returning a value, which is set for the key
result_value.
While using the PythonOperator as t2, i am able to get the value of the
result of task t1.
Code for doing this in PythonOperator is:
pull = PythonOperator(
task_id='puller', dag=main_dag, provide_context=True,
python_callable=puller)
def puller(**kwargs):
ti = kwargs['ti']
v1 = ti.xcom_pull(key=None, task_ids=[t1])
logging.info("v1 :%s" %v1)
How can i do that in any other operator?
I tried, accessing 'ti' from context as well as kwargs, for both of them i
get the following error:
task_instance = context['ti']
task_instance = context['ti']
TypeError: string indices must be integers
Any pointers?
Regards,
Twinkle