kaxil commented on a change in pull request #16926:
URL: https://github.com/apache/airflow/pull/16926#discussion_r667491445



##########
File path: docs/apache-airflow/best-practices.rst
##########
@@ -109,6 +109,9 @@ or if you need to deserialize a json object from the 
variable :
 
     {{ var.json.<variable_name> }}
 
+Alternative option is to read from the environment variables in the top level 
python code instead of Airflow variables.
+This will avoid new connections to Airflow metadata DB everytime Airflow 
parses the python file.

Review comment:
       From Airflow >= 1.10.10 -- you can use Environment Variables to set 
Airflow Variables, hence connections to DB are not made.




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to