Dags¶
A Dag is a workflow: tasks, the dependencies between them, and a schedule.
Dags live in your workspace and are identified by a dag_id that is unique
inside that workspace.
Create a Dag¶
You can create a Dag in three ways:
- Write it in Forge — Python or YAML. Saving creates a git commit.
- Import YAML — upload a
.dag.yamlfile. The Dag processor imports it directly; no stub file is generated. - Ask the agent — describe the workflow in the chat and review the draft. See AI Chat.
The Dag processor picks up changes automatically. Use Reparse on the Dag page to force a parse.
Structure¶
A Dag has:
- tasks — the steps, each with an operator and parameters;
- dependencies — which tasks run before which;
- schedule — cron, a preset such as
@daily, or none; - defaults — owner, retries, retry delay, tags.
Run a Dag¶
- Manual trigger — run the Dag now from its page.
- Schedule — DagForge creates runs on the schedule.
- Backfill — run over a date range in the past. Backfills can be paused, resumed and cancelled without affecting scheduled runs.
- API — a published endpoint can start the Dag. See API Platform.
Inside a Dag¶
| Tab | Shows |
|---|---|
| Overview | Dag summary, recent runs and health |
| Runs | State, duration and trigger type per run |
| Tasks | Task instances and their states |
| Calendar | Run history by date |
| Required Actions | Human-in-the-loop approvals |
| Backfills | Past-range runs you started |
| Events | Dag-level event history |
| Code | The parsed source and its version history |
| Details | Schedule, owner, tags and settings |
Inside a run¶
Task Instances · Required Actions · Events · Code · Details · Asset Events.
The run page shows the grid, the task instances, their logs and the assets the run produced or consumed.
Inside a task instance¶
Task Instances · Mapped · Group · Details · Logs · XCom · Rendered Templates · Asset Events · Required Actions.
Open Logs for the attempt log, XCom for the values the task pushed, and Rendered Templates to see the command or template after rendering.
Parse warnings¶
If a Dag does not appear, open the Warnings tab and the Dag processor log. The line number points at the failing import or syntax. See Troubleshooting.
Example YAML¶
my_dag:
default_args:
owner: data-team
retries: 1
schedule: "@daily"
tasks:
hello:
operator: airflow.providers.standard.operators.bash.BashOperator
bash_command: echo hello
Limits and notes¶
- Task code runs through the Execution API and cannot open the metadata database directly. Use connections, variables and XComs through the SDK.
- A Dag change is a git commit. Use the history view to see who changed what.
- A Dag that fails to parse does not run. Open the parse log and the Warnings tab first.
Related¶
- Forge — edit and validate Dags in the browser.
- Packages — install libraries your Dag imports.
- Observability — follow a run and its logs.