Please consider this scenario:
I have a cloud Dag on cloud composer that triggers a cloud function. That function hits an api and then stores tables in GCS. Now my Airflow DAG(using Cloud Composer) triggers next stage i.e a Dataproc job that takes the table from GCS and pushes into BQ but when I trigger my Dataproc workflow template, I am passing a parameter that is the name of the table from the dag itself and that parameter I want to pick from x_com.
Here is a code snippet throws an error that it is not defined
dataproc_job = dataproc_operator.DataprocWorkflowTemplateInstantiateOperator(
# The task id of your job
task_id="dataproc_job",
# The template id of your workflow
template_id="newwf1",
project_id='#######',
region="us-central1",
parameters={"TABLE_NAME":ti.xcom_pull(task_ids=simple_http}
)
How can I resolve this error and pass x_com value as a parameter to my next step in DAG ?