我有一个包含三个bash任务的DAG,该任务计划每天运行.
I have a DAG with three bash tasks which is scheduled to run every day.
我想在所有bash脚本中访问dag实例的唯一ID(可能是PID).
I would like to access unique ID of dag instance(may be PID) in all bash scripts.
有什么办法吗?
我正在寻找与Oozie类似的功能,可以在工作流xml或java代码中访问WORKFLOW_ID.
I am looking for similar functionality as Oozie where we can access WORKFLOW_ID in workflow xml or java code.
有人可以指出我有关如何在AirFlow DAG中使用内置变量和自定义变量"的文档吗?
Can somebody point me to documentation of AirFlow on "How to use in-build and custom variables in AirFlow DAG"
非常感谢 帕里
推荐答案可以在jinja2中使用点符号访问对象的属性(请参见 airflow.apache/code.html#macros ).在这种情况下,它就是:
Object's attributes can be accessed with dot notation in jinja2 (see airflow.apache/code.html#macros). In this case, it would simply be:
{{ dag.dag_id }}更多推荐
子任务中的AirFlow dag id访问
发布评论