How to See a Task's Rendered Templates in the Apache Airflow® UI
Some task parameters in Apache Airflow® can hold {{ }} templates, placeholders that Airflow fills in just before the task runs. The Rendered Templates tab shows each one as Airflow filled it in, so you can check the exact command a task ran. This guide renders a BashOperator command on Airflow 3.4.0.
The Example
A Dag called show_run_id has one BashOperator task, print_run_id, that runs echo "This is run {{ run_id }} of {{ dag.dag_id }}". {{ run_id }} is replaced by the run's ID and {{ dag.dag_id }} by the Dag's ID.
Airflow's UI documentation describes the tab: it "Displays the rendered version of templated fields in your task. Useful for debugging context variables or verifying dynamic content." Templated fields are the parameters Airflow renders. For BashOperator, those are bash_command, env and cwd.
Prerequisites
- Apache Airflow® running, for example with
airflow standalone, and itsdagsfolder in yourAIRFLOW_HOME.
Step 1: Write a Dag with a Template
Create dags/show_run_id.py:
from airflow.providers.standard.operators.bash import BashOperator
from airflow.sdk import dag
@dag(schedule=None, tags=["demo"])
def show_run_id():
BashOperator(
task_id="print_run_id",
bash_command='echo "This is run {{ run_id }} of {{ dag.dag_id }}"',
)
show_run_id()

- The double braces mark the templates. Airflow uses Jinja to fill them in, before bash sees the command.
run_idanddagare variables Airflow makes available to every template. The templates reference lists all of them.
Step 2: Open the Rendered Templates Tab
Trigger the Dag. Then open it, click the run's square for print_run_id in the grid on the left, and open the Rendered Templates tab:

The tab lists each templated field that has a value, here bash_command, with the templates filled in. {{ run_id }} became manual__2026-12-04T10:29:14.261713+00:00, the same run ID the page shows at the top, and {{ dag.dag_id }} became show_run_id.
Step 3: Compare It with the Log
Open the Logs tab:

The Running command line shows the same rendered command, and the output is the sentence it printed. The Rendered Templates tab also shows fields that never appear in the log: for a BashOperator with env={"FILE_NAME": ...}, it listed env too, with the value filled in, "FILE_NAME": "report-2026.txt".
Common Mistakes
| Mistake | What happens | Do this instead |
|---|---|---|
Single braces, as in a Python f-string: {run_id} | Nothing is filled in: the task printed This is run {run_id} | Use double braces: {{ run_id }} |
A misspelled variable: {{ runid }} | The task fails with jinja2.exceptions.UndefinedError: 'runid' is undefined | Check the name in the templates reference |
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
UndefinedError: '<name>' is undefined | The template uses a variable that doesn't exist | Fix the name in the template |
| Braces in the task's output | The template has single braces, so Jinja ignored it | Use double braces |
FAQ
What's the difference between the Rendered Templates and XCom tabs?
The Rendered Templates tab shows what went into a task: its parameters after Airflow filled in the templates. The XCom tab shows what came out of it: the values it stored for other tasks. How to See a Task's XComs in the Apache Airflow® UI covers that tab.
Conclusion
The Rendered Templates tab showed print_run_id's bash_command after Airflow filled in its templates: {{ run_id }} became the run's ID and {{ dag.dag_id }} the Dag's ID. When a templated task does something unexpected, check this tab first: it shows exactly what Airflow handed to the task.
Additional Resources
- UI overview: Rendered Templates — the task instance tabs.
- Templates reference — every variable a template can use.
- BashOperator reference — which parameters are templated.
Apache®, Apache Airflow and Airflow® are either registered trademarks or trademarks of The Apache Software Foundation in the United States and/or other countries. No endorsement by The Apache Software Foundation is implied by the use of these marks.
