incubator-airflow/airflow/hooks/postgres_hook.py

29 строки
1.1 KiB
Python
Исходник Обычный вид История

#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
[AIRFLOW-6610] Move software classes to providers package (#7231) * [AIP-21] Move contrib.hooks.mongo_hook providers.mongo.hooks.mongo * [AIP-21] Move contrib.hooks.openfaas_hook providers.openfass.hooks.openfaas * [AIP-21] Move contrib.hooks.redis_hook providers.redis.hooks.redis * [AIP-21] Move contrib.operators.docker_swarm_operator providers.docker.operators.docker_swarm * [AIP-21] Move contrib.operators.redis_publish_operator providers.redis.operators.redis_publish * [AIP-21] Move contrib.operators.kubernetes_pod_operator providers.cncf.kubernetes.operators.kubernetes_pod * [AIP-21] Move contrib.sensors.bash_sensor sensors.bash * [AIP-21] Move contrib.sensors.celery_queue_sensor providers.celery.sensors.celery_queue * [AIP-21] Move contrib.sensors.mongo_sensor providers.mongo.sensors.mongo * [AIP-21] Move contrib.sensors.python_sensor sensors.python * [AIP-21] Move contrib.sensors.redis_key_sensor providers.redis.sensors.redis_key * [AIP-21] Move contrib.sensors.redis_pub_sub_sensor providers.redis.sensors.redis_pub_sub * [AIP-21] Move hooks.docker_hook providers.docker.hooks.docker * [AIP-21] Move hooks.mssql_hook providers.microsoft.mssql.hooks.mssql * [AIP-21] Move hooks.mysql_hook providers.mysql.hooks.mysql * [AIP-21] Move hooks.oracle_hook providers.oracle.hooks.oracle * [AIP-21] Move hooks.postgres_hook providers.postgres.hooks.postgres * [AIP-21] Move hooks.presto_hook providers.presto.hooks.presto * [AIP-21] Move hooks.samba_hook providers.samba.hooks.samba * [AIP-21] Move hooks.sqlite_hook providers.sqlite.hooks.sqlite * [AIP-21] Move operators.bash_operator operators.bash * [AIP-21] Move operators.docker_operator providers.docker.operators.docker * [AIP-21] Move operators.mssql_operator providers.microsoft.mssql.operators.mssql * [AIP-21] Move operators.mysql_operator providers.mssql.operators.mysql * [AIP-21] Move operators.oracle_operator providers.oracle.operators.oracle * [AIP-21] Move operators.papermill_operator providers.papermill.operators.papermill * [AIP-21] Move operators.postgres_operator providers.postgres.operators.postgres * [AIP-21] Move operators.presto_check_operator providers.presto.operators.presto_check * [AIP-21] Move operators.python_operator operators.python * [AIP-21] Move operators.sqlite_operator providers.sqlite.operators.sqlite * Update docs
2020-01-21 20:00:52 +03:00
"""This module is deprecated. Please use `airflow.providers.postgres.hooks.postgres`."""
[AIRFLOW-6610] Move software classes to providers package (#7231) * [AIP-21] Move contrib.hooks.mongo_hook providers.mongo.hooks.mongo * [AIP-21] Move contrib.hooks.openfaas_hook providers.openfass.hooks.openfaas * [AIP-21] Move contrib.hooks.redis_hook providers.redis.hooks.redis * [AIP-21] Move contrib.operators.docker_swarm_operator providers.docker.operators.docker_swarm * [AIP-21] Move contrib.operators.redis_publish_operator providers.redis.operators.redis_publish * [AIP-21] Move contrib.operators.kubernetes_pod_operator providers.cncf.kubernetes.operators.kubernetes_pod * [AIP-21] Move contrib.sensors.bash_sensor sensors.bash * [AIP-21] Move contrib.sensors.celery_queue_sensor providers.celery.sensors.celery_queue * [AIP-21] Move contrib.sensors.mongo_sensor providers.mongo.sensors.mongo * [AIP-21] Move contrib.sensors.python_sensor sensors.python * [AIP-21] Move contrib.sensors.redis_key_sensor providers.redis.sensors.redis_key * [AIP-21] Move contrib.sensors.redis_pub_sub_sensor providers.redis.sensors.redis_pub_sub * [AIP-21] Move hooks.docker_hook providers.docker.hooks.docker * [AIP-21] Move hooks.mssql_hook providers.microsoft.mssql.hooks.mssql * [AIP-21] Move hooks.mysql_hook providers.mysql.hooks.mysql * [AIP-21] Move hooks.oracle_hook providers.oracle.hooks.oracle * [AIP-21] Move hooks.postgres_hook providers.postgres.hooks.postgres * [AIP-21] Move hooks.presto_hook providers.presto.hooks.presto * [AIP-21] Move hooks.samba_hook providers.samba.hooks.samba * [AIP-21] Move hooks.sqlite_hook providers.sqlite.hooks.sqlite * [AIP-21] Move operators.bash_operator operators.bash * [AIP-21] Move operators.docker_operator providers.docker.operators.docker * [AIP-21] Move operators.mssql_operator providers.microsoft.mssql.operators.mssql * [AIP-21] Move operators.mysql_operator providers.mssql.operators.mysql * [AIP-21] Move operators.oracle_operator providers.oracle.operators.oracle * [AIP-21] Move operators.papermill_operator providers.papermill.operators.papermill * [AIP-21] Move operators.postgres_operator providers.postgres.operators.postgres * [AIP-21] Move operators.presto_check_operator providers.presto.operators.presto_check * [AIP-21] Move operators.python_operator operators.python * [AIP-21] Move operators.sqlite_operator providers.sqlite.operators.sqlite * Update docs
2020-01-21 20:00:52 +03:00
import warnings
2019-08-29 05:31:56 +03:00
[AIRFLOW-6610] Move software classes to providers package (#7231) * [AIP-21] Move contrib.hooks.mongo_hook providers.mongo.hooks.mongo * [AIP-21] Move contrib.hooks.openfaas_hook providers.openfass.hooks.openfaas * [AIP-21] Move contrib.hooks.redis_hook providers.redis.hooks.redis * [AIP-21] Move contrib.operators.docker_swarm_operator providers.docker.operators.docker_swarm * [AIP-21] Move contrib.operators.redis_publish_operator providers.redis.operators.redis_publish * [AIP-21] Move contrib.operators.kubernetes_pod_operator providers.cncf.kubernetes.operators.kubernetes_pod * [AIP-21] Move contrib.sensors.bash_sensor sensors.bash * [AIP-21] Move contrib.sensors.celery_queue_sensor providers.celery.sensors.celery_queue * [AIP-21] Move contrib.sensors.mongo_sensor providers.mongo.sensors.mongo * [AIP-21] Move contrib.sensors.python_sensor sensors.python * [AIP-21] Move contrib.sensors.redis_key_sensor providers.redis.sensors.redis_key * [AIP-21] Move contrib.sensors.redis_pub_sub_sensor providers.redis.sensors.redis_pub_sub * [AIP-21] Move hooks.docker_hook providers.docker.hooks.docker * [AIP-21] Move hooks.mssql_hook providers.microsoft.mssql.hooks.mssql * [AIP-21] Move hooks.mysql_hook providers.mysql.hooks.mysql * [AIP-21] Move hooks.oracle_hook providers.oracle.hooks.oracle * [AIP-21] Move hooks.postgres_hook providers.postgres.hooks.postgres * [AIP-21] Move hooks.presto_hook providers.presto.hooks.presto * [AIP-21] Move hooks.samba_hook providers.samba.hooks.samba * [AIP-21] Move hooks.sqlite_hook providers.sqlite.hooks.sqlite * [AIP-21] Move operators.bash_operator operators.bash * [AIP-21] Move operators.docker_operator providers.docker.operators.docker * [AIP-21] Move operators.mssql_operator providers.microsoft.mssql.operators.mssql * [AIP-21] Move operators.mysql_operator providers.mssql.operators.mysql * [AIP-21] Move operators.oracle_operator providers.oracle.operators.oracle * [AIP-21] Move operators.papermill_operator providers.papermill.operators.papermill * [AIP-21] Move operators.postgres_operator providers.postgres.operators.postgres * [AIP-21] Move operators.presto_check_operator providers.presto.operators.presto_check * [AIP-21] Move operators.python_operator operators.python * [AIP-21] Move operators.sqlite_operator providers.sqlite.operators.sqlite * Update docs
2020-01-21 20:00:52 +03:00
# pylint: disable=unused-import
from airflow.providers.postgres.hooks.postgres import PostgresHook # noqa
[AIRFLOW-6610] Move software classes to providers package (#7231) * [AIP-21] Move contrib.hooks.mongo_hook providers.mongo.hooks.mongo * [AIP-21] Move contrib.hooks.openfaas_hook providers.openfass.hooks.openfaas * [AIP-21] Move contrib.hooks.redis_hook providers.redis.hooks.redis * [AIP-21] Move contrib.operators.docker_swarm_operator providers.docker.operators.docker_swarm * [AIP-21] Move contrib.operators.redis_publish_operator providers.redis.operators.redis_publish * [AIP-21] Move contrib.operators.kubernetes_pod_operator providers.cncf.kubernetes.operators.kubernetes_pod * [AIP-21] Move contrib.sensors.bash_sensor sensors.bash * [AIP-21] Move contrib.sensors.celery_queue_sensor providers.celery.sensors.celery_queue * [AIP-21] Move contrib.sensors.mongo_sensor providers.mongo.sensors.mongo * [AIP-21] Move contrib.sensors.python_sensor sensors.python * [AIP-21] Move contrib.sensors.redis_key_sensor providers.redis.sensors.redis_key * [AIP-21] Move contrib.sensors.redis_pub_sub_sensor providers.redis.sensors.redis_pub_sub * [AIP-21] Move hooks.docker_hook providers.docker.hooks.docker * [AIP-21] Move hooks.mssql_hook providers.microsoft.mssql.hooks.mssql * [AIP-21] Move hooks.mysql_hook providers.mysql.hooks.mysql * [AIP-21] Move hooks.oracle_hook providers.oracle.hooks.oracle * [AIP-21] Move hooks.postgres_hook providers.postgres.hooks.postgres * [AIP-21] Move hooks.presto_hook providers.presto.hooks.presto * [AIP-21] Move hooks.samba_hook providers.samba.hooks.samba * [AIP-21] Move hooks.sqlite_hook providers.sqlite.hooks.sqlite * [AIP-21] Move operators.bash_operator operators.bash * [AIP-21] Move operators.docker_operator providers.docker.operators.docker * [AIP-21] Move operators.mssql_operator providers.microsoft.mssql.operators.mssql * [AIP-21] Move operators.mysql_operator providers.mssql.operators.mysql * [AIP-21] Move operators.oracle_operator providers.oracle.operators.oracle * [AIP-21] Move operators.papermill_operator providers.papermill.operators.papermill * [AIP-21] Move operators.postgres_operator providers.postgres.operators.postgres * [AIP-21] Move operators.presto_check_operator providers.presto.operators.presto_check * [AIP-21] Move operators.python_operator operators.python * [AIP-21] Move operators.sqlite_operator providers.sqlite.operators.sqlite * Update docs
2020-01-21 20:00:52 +03:00
warnings.warn(
"This module is deprecated. Please use `airflow.providers.postgres.hooks.postgres`.",
DeprecationWarning, stacklevel=2
)