airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fo...@apache.org
Subject [32/50] incubator-airflow git commit: [AIRFLOW-2401] Document the use of variables in Jinja template
Date Fri, 04 May 2018 07:02:28 GMT
[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/v1-10-test
Commit: a67c13e44cb96acacc79896b327bbaaae19707a1
Parents: 8921e7d
Author: Moe Nadal <moe.nadal@creditkarma.com>
Authored: Mon Apr 30 15:05:47 2018 -0700
Committer: r39132 <siddharthanand@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
 =========


Mime
View raw message