Skip to content

Commit

Permalink
Add note about Variable precedence with env vars (#21568)
Browse files Browse the repository at this point in the history
This PR updates some documentation regarding setting Airflow Variables using environment variables. Environment variables take precedence over variables defined in the UI/metastore based on this default search path list: https://github.dev/apache/airflow/blob/7864693e43c40fd8f0914c05f7e196a007d16d50/airflow/secrets/__init__.py#L29-L30
  • Loading branch information
AetherUnbound authored Feb 15, 2022
1 parent 1b568d7 commit 7a268cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/apache-airflow/howto/variable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ You can use them in your DAGs as:
Single underscores surround ``VAR``. This is in contrast with the way ``airflow.cfg``
parameters are stored, where double underscores surround the config section name.
Variables set using Environment Variables would not appear in the Airflow UI but you will
be able to use them in your DAG file.
be able to use them in your DAG file. Variables set using Environment Variables will also
take precedence over variables defined in the Airflow UI.

Securing Variables
------------------
Expand Down

0 comments on commit 7a268cb

Please sign in to comment.