You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add date format filters to Jinja environment (#17451)
On its own this doesn't add all that much, but this is preparatory
work to be combined with the new data_interval_start template context
variables we are adding, without having to add the ds/ts/no-dash etc
permutations of all of them.
Copy file name to clipboardexpand all lines: docs/apache-airflow/concepts/operators.rst
+2-2
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ But there are many, many more - you can see the list of those in our :doc:`apach
58
58
59
59
Jinja Templating
60
60
----------------
61
-
Airflow leverages the power of `Jinja Templating <http://jinja.pocoo.org/docs/dev/>`_ and this can be a powerful tool to use in combination with :doc:`macros </macros-ref>`.
61
+
Airflow leverages the power of `Jinja Templating <http://jinja.pocoo.org/docs/dev/>`_ and this can be a powerful tool to use in combination with :ref:`macros <templates-ref>`.
62
62
63
63
For example, say you want to pass the execution date as an environment variable to a Bash script using the ``BashOperator``:
64
64
@@ -73,7 +73,7 @@ For example, say you want to pass the execution date as an environment variable
73
73
env={"EXECUTION_DATE": date},
74
74
)
75
75
76
-
Here, ``{{ ds }}`` is a macro, and because the ``env`` parameter of the ``BashOperator`` is templated with Jinja, the execution date will be available as an environment variable named ``EXECUTION_DATE`` in your Bash script.
76
+
Here, ``{{ ds }}`` is a templated variable, and because the ``env`` parameter of the ``BashOperator`` is templated with Jinja, the execution date will be available as an environment variable named ``EXECUTION_DATE`` in your Bash script.
77
77
78
78
You can use Jinja templating with every parameter that is marked as "templated" in the documentation. Template substitution occurs just before the ``pre_execute`` function of your operator is called.
0 commit comments