Skip to content
LakeBench
ProblemsCommunityPricing
Sign inStart practicing
Back
  1. Home
  2. Interview prep
  3. What is Jinja templating?

Airflow & DAGs · Advanced Development

What is Jinja templating?

Easyairflow-26
jinjatemplating

Question

What is Jinja templating in Airflow?

Solution

Jinja inserts dynamic values into templated task fields.

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

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

If logical date 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.

PreviousNext