title: How do you access Airflow variables with task decorators using jinja templating?
body: <p>I'm currently accessing an Airflow variable as follows:</p>
  <pre><code>from airflow.models import Variable
  
  s3_bucket = Variable.get('bucket_name')
  </code></pre>
  <p>It works but I'm being asked to not use the Variable module and use jinja templating instead (i.e.):</p>
  <pre><code>s3_bucket = '{{ var.value.bucket_name }}'
  </code></pre>
  <p>The problem is jinja works when I'm using it in an airflow template (e.g., PythonOperator/BashOperator) but I'm having trouble getting it to work in taskflow API form. The variable is read as string literal. Example:</p>
  <pre><code># Pretend DAG defined here
  
  @task
  def example_task():
      s3_bucket = '{{ var.value.bucket_name }}'
      print(s3_bucket)
  
  example_task()
  </code></pre>
  <p>The above would print &quot;{{ var.value.bucket_name }}&quot; instead of the bucket_name value.</p>