首页 > 解决方案 > Storing execution parameters in the Airflow database

问题描述

I am creating DAGs having parameters changing (possibly) every run.

Is there a way to store them in the Airflow metadata db? This would allow having a single db containing full run audit (list of runs with their parameters, statuses, etc).

Currently I use XComs pushing them within the execute method of operators but (except for the fact that's not what XComs are for) it's not easy to query them (as they are serialized by SqlAlchemy to blobs).

标签: airflow

解决方案


您可以将它们存储为Airflow 变量- 默认情况下它不会像 XComs 那样存储执行日期,但您应该能够手动添加它。


推荐阅读