ashb commented on a change in pull request #7923: Get Airflow Variables from 
Environment Variables
URL: https://github.com/apache/airflow/pull/7923#discussion_r399639963
 
 

 ##########
 File path: docs/concepts.rst
 ##########
 @@ -687,6 +687,34 @@ or if you need to deserialize a json object from the 
variable :
 
     echo {{ var.json.<variable_name> }}
 
+Storing Variables in Environment Variables
+------------------------------------------
+
+Airflow Variables can also be created and managed using Environment Variables. 
The environment variable
+naming convention is ``AIRFLOW_VAR_<variable_name>``, all uppercase.
+So if your variable key is ``FOO`` then the variable name should be 
``AIRFLOW_VAR_FOO``.
+
+For example,
+
+.. code:: bash
+
+    export AIRFLOW_VAR_FOO=BAR
+
+    # To use JSON, store them as JSON strings
+    export AIRFLOW_VAR_FOO_JSON='{"hello":"world"}'
 
 Review comment:
   This makes it look like the _JSON suffix on the name is important, but it's 
not.
   
   Let's change this example name

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to