You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by sa...@apache.org on 2018/04/30 22:08:19 UTC
incubator-airflow git commit: [AIRFLOW-2401] Document the use of
variables in Jinja template
Repository: incubator-airflow
Updated Branches:
refs/heads/master 8921e7d70 -> a67c13e44
[AIRFLOW-2401] Document the use of variables in Jinja template
Closes #2847 from moe-nadal-ck/patch-1
Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/a67c13e4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/a67c13e4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/a67c13e4
Branch: refs/heads/master
Commit: a67c13e44cb96acacc79896b327bbaaae19707a1
Parents: 8921e7d
Author: Moe Nadal <mo...@creditkarma.com>
Authored: Mon Apr 30 15:05:47 2018 -0700
Committer: r39132 <si...@yahoo.com>
Committed: Mon Apr 30 15:06:10 2018 -0700
----------------------------------------------------------------------
docs/concepts.rst | 12 ++++++++++++
1 file changed, 12 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/a67c13e4/docs/concepts.rst
----------------------------------------------------------------------
diff --git a/docs/concepts.rst b/docs/concepts.rst
index 89c25fe..c28b10f 100644
--- a/docs/concepts.rst
+++ b/docs/concepts.rst
@@ -427,6 +427,18 @@ The second call assumes ``json`` content and will be deserialized into
``bar``. Note that ``Variable`` is a sqlalchemy model and can be used
as such.
+You can use a variable from a jinja template with the syntax :
+
+.. code:: bash
+
+ echo {{ var.value.<variable_name> }}
+
+or if you need to deserialize a json object from the variable :
+
+.. code:: bash
+
+ echo {{ var.json.<variable_name> }}
+
Branching
=========