You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, accessing DAG details (like schedule, last run time, etc.) within tasks requires workarounds or potentially undocumented environment variables. This makes it difficult for tasks to react dynamically to DAG-specific information.
We would like to add a new environment variable, DAG_DETAILS_JSON, which will contain a JSON representation of all relevant DAG metadata. This will provide a consistent and comprehensive way for tasks to access this information, especially useful for executors like jq that can easily parse JSON.
Example Usage (with jq):
steps:
- name: get scheduleexecutor: jqcommand: '.schedule'script: "echo $DAG_DETAILS_JSON"output: DAG_SCHEDULE
yohamta
changed the title
Add DAG_DETAILS_JSON for access to DAG metadata within tasks
executor: Add DAG_DETAILS_JSON for access to DAG metadata within tasks
Dec 29, 2024
Currently, accessing DAG details (like schedule, last run time, etc.) within tasks requires workarounds or potentially undocumented environment variables. This makes it difficult for tasks to react dynamically to DAG-specific information.
We would like to add a new environment variable,
DAG_DETAILS_JSON
, which will contain a JSON representation of all relevant DAG metadata. This will provide a consistent and comprehensive way for tasks to access this information, especially useful for executors likejq
that can easily parse JSON.Example Usage (with jq):
Related discussions: #708
The text was updated successfully, but these errors were encountered: