You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Cooper Gillan (JIRA)" <ji...@apache.org> on 2019/08/16 20:24:00 UTC

[jira] [Work started] (AIRFLOW-3705) PostgresHook's get_conn method calls incorrect attribute by default

     [ https://issues.apache.org/jira/browse/AIRFLOW-3705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on AIRFLOW-3705 started by Cooper Gillan.
----------------------------------------------
> PostgresHook's get_conn method calls incorrect attribute by default 
> --------------------------------------------------------------------
>
>                 Key: AIRFLOW-3705
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3705
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: database
>    Affects Versions: 1.10.2
>            Reporter: Cooper Gillan
>            Assignee: Cooper Gillan
>            Priority: Minor
>
> Sub-classing {{PostgresHook}} to specify separate connections is currently not possible due to [{{get_conn}} callingĀ {{self.postgres_conn_id}} directly|https://github.com/apache/airflow/blob/c030729dcbe35a2a4869e46b57a761c8376ede8d/airflow/hooks/postgres_hook.py#L46]. It should be possible to set different values for [{{self.conn_name_attr}}|https://github.com/apache/airflow/blob/c030729dcbe35a2a4869e46b57a761c8376ede8d/airflow/hooks/postgres_hook.py#L37], in sub-classes of the hook.
> For example, if sub-classing {{PostgresHook}} to set up separate named connections to multiple Postgres instances, the {{postgres_conn_id}} of the sub-class must be set specifically. This is true despite the fact that {{conn_name_attr}} is set up in a way that should allow any connection to be specified.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)