Fix postgres hook
Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/f171d17e Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/f171d17e Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/f171d17e Branch: refs/heads/v1-8-test Commit: f171d17e8b5ef698f487bed8a40c6dd21ed81b51 Parents: 3927e00 Author: Bolke de Bruin <[email protected]> Authored: Sun Mar 12 10:34:19 2017 -0700 Committer: Bolke de Bruin <[email protected]> Committed: Sun Mar 12 10:34:19 2017 -0700 ---------------------------------------------------------------------- airflow/hooks/postgres_hook.py | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/f171d17e/airflow/hooks/postgres_hook.py ---------------------------------------------------------------------- diff --git a/airflow/hooks/postgres_hook.py b/airflow/hooks/postgres_hook.py index 750ebbb..584930d 100644 --- a/airflow/hooks/postgres_hook.py +++ b/airflow/hooks/postgres_hook.py @@ -28,6 +28,10 @@ class PostgresHook(DbApiHook): default_conn_name = 'postgres_default' supports_autocommit = True + def __init__(self, *args, **kwargs): + super(PostgresHook, self).__init__(*args, **kwargs) + self.schema = kwargs.pop("schema", None) + def get_conn(self): conn = self.get_connection(self.postgres_conn_id) conn_args = dict(
