[ 
https://issues.apache.org/jira/browse/AIRFLOW-2839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16569533#comment-16569533
 ] 

ASF subversion and git services commented on AIRFLOW-2839:
----------------------------------------------------------

Commit c0c63ae2a495b8f808c36acc35d752e916393954 in incubator-airflow's branch 
refs/heads/master from Xiaodong
[ https://gitbox.apache.org/repos/asf?p=incubator-airflow.git;h=c0c63ae ]

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



> Answer a question in doc: what if I have connections with the same conn_id in 
> both metadata and environment variables?
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: AIRFLOW-2839
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2839
>             Project: Apache Airflow
>          Issue Type: Improvement
>          Components: configuration, Documentation
>            Reporter: Xiaodong DENG
>            Assignee: Xiaodong DENG
>            Priority: Critical
>             Fix For: 2.0.0
>
>
> We can define connections either in metadata database or environment 
> variables.
>  
> However, how about there are connections with the same conn_id in both 
> metadata database and environment variables? Will one of them be picked? 
> Which one? Or a random one will be picked?
>  
> The answer is: Airflow will check environment variables 
> first.[https://github.com/apache/incubator-airflow/blob/master/airflow/hooks/base_hook.py#L70]
>   The "random picking" mechanism will only be applicable for multiple 
> connections with the same conn_id in metadata database (if there is no 
> connection with the same conn_id defined in environment variables).
>  
> This should be made clear in the documentation.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to