Airflow & DAGs · Advanced Development

What is Jinja templating?

Easyjinjatemplating

Interview question

What is Jinja templating in Airflow?

How to answer

The short answer

Jinja inserts dynamic values into templated task fields.

Common macros: {{ ds }}, {{ logical_date }}, {{ dag.dag_id }}, {{ task.task_id }}, {{ run_id }}.

Python
bash_command="process --date {{ ds }}"

If is 2026-09-05, Airflow renders process --date 2026-09-05.

Interview tip: Templating is rendered before the task runs; not every parameter is templated unless the operator field supports it.