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

(cherry picked from commit 7a268cb)
  • Loading branch information
AetherUnbound authored and jedcunningham committed Feb 16, 2022
1 parent 2aec9d8 commit c03b086
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/apache-airflow/howto/variable.rst
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 c03b086

Please sign in to comment.