首页 > 解决方案 > 从 Airflow REST Experimental API 读取配置/数据

问题描述

我想在 Airflow DAG 中阅读此配置,但我无法找到如何做到这一点。我在 StackOverFlow 上读到 dag_run 可以使用,但我仍然无法定义语法或如何使用它。任何帮助将不胜感激。

conf = '{"conf1":"Welcome to Airflow"}' url = "http://localhost:8080/api/experimental/dags/example_parameterized_dag/dag_runs" response = requests.post(url, data=conf, headers= headers) logging.info('Response: %s', response)

标签: airflow

解决方案


推荐阅读