【发布时间】:2020-02-01 20:37:01
【问题描述】:
如何从先前运行的气流中提取 xcom 变量?有可能吗?
我想使用之前 run_id 中相同 task_id 的值作为 SimpeHttpOperator 中 data 参数的 jinja 变量。
我正在查看宏文档https://airflow.apache.org/docs/stable/macros.html 并且找不到任何记录在案的方法。
UPD 示例:
select_expired = SimpleHttpOperator(
task_id='select_expired',
http_conn_id='clickhouse_http',
endpoint='/',
method='POST',
data=REQUESTED_EXPIRED_FLIGHTS,
xcom_push=True,
pool='clickhouse_select',
dag=dag
)
REQUESTED_EXPIRED_FLIGHTS 是:
insert into table where column = '{{ ??????? (value returned in previous task) }}'
【问题讨论】:
标签: airflow