[AIRFLOW-2839] Refine Doc Concepts->Connections (#3678)

This commit is contained in:
Xiaodong 2018-08-06 02:08:15 +08:00 коммит произвёл Kaxil Naik
Родитель 87013d7f29
Коммит c0c63ae2a4
1 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -333,6 +333,17 @@ from ``BaseHook``, Airflow will choose one connection randomly, allowing
for some basic load balancing and fault tolerance when used in conjunction
with retries.
Airflow also has the ability to reference connections via environment
variables from the operating system. But it only supports URI format. If you
need to specify ``extra`` for your connection, please use web UI.
If connections with the same ``conn_id`` are defined in both Airflow metadata
database and environment variables, only the one in environment variables
will be referenced by Airflow (for example, given ``conn_id`` ``postgres_master``,
Airflow will search for ``AIRFLOW_CONN_POSTGRES_MASTER``
in environment variables first and directly reference it if found,
before it starts to search in metadata database).
Many hooks have a default ``conn_id``, where operators using that hook do not
need to supply an explicit connection ID. For example, the default
``conn_id`` for the :class:`~airflow.hooks.postgres_hook.PostgresHook` is