Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/airflow/hooks/__init__.py: 100%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

5 statements  

1# 

2# Licensed to the Apache Software Foundation (ASF) under one 

3# or more contributor license agreements. See the NOTICE file 

4# distributed with this work for additional information 

5# regarding copyright ownership. The ASF licenses this file 

6# to you under the Apache License, Version 2.0 (the 

7# "License"); you may not use this file except in compliance 

8# with the License. You may obtain a copy of the License at 

9# 

10# http://www.apache.org/licenses/LICENSE-2.0 

11# 

12# Unless required by applicable law or agreed to in writing, 

13# software distributed under the License is distributed on an 

14# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 

15# KIND, either express or implied. See the License for the 

16# specific language governing permissions and limitations 

17# under the License. 

18# fmt:, off 

19"""Hooks.""" 

20 

21from __future__ import annotations 

22 

23from airflow.utils.deprecation_tools import add_deprecated_classes 

24 

25__deprecated_classes = { 

26 "S3_hook": { 

27 "S3Hook": "airflow.providers.amazon.aws.hooks.s3.S3Hook", 

28 "provide_bucket_name": "airflow.providers.amazon.aws.hooks.s3.provide_bucket_name", 

29 }, 

30 "base_hook": { 

31 "BaseHook": "airflow.hooks.base.BaseHook", 

32 }, 

33 "dbapi_hook": { 

34 "DbApiHook": "airflow.providers.common.sql.hooks.sql.DbApiHook", 

35 }, 

36 "docker_hook": { 

37 "DockerHook": "airflow.providers.docker.hooks.docker.DockerHook", 

38 }, 

39 "druid_hook": { 

40 "DruidDbApiHook": "airflow.providers.apache.druid.hooks.druid.DruidDbApiHook", 

41 "DruidHook": "airflow.providers.apache.druid.hooks.druid.DruidHook", 

42 }, 

43 "hive_hooks": { 

44 "HIVE_QUEUE_PRIORITIES": "airflow.providers.apache.hive.hooks.hive.HIVE_QUEUE_PRIORITIES", 

45 "HiveCliHook": "airflow.providers.apache.hive.hooks.hive.HiveCliHook", 

46 "HiveMetastoreHook": "airflow.providers.apache.hive.hooks.hive.HiveMetastoreHook", 

47 "HiveServer2Hook": "airflow.providers.apache.hive.hooks.hive.HiveServer2Hook", 

48 }, 

49 "http_hook": { 

50 "HttpHook": "airflow.providers.http.hooks.http.HttpHook", 

51 }, 

52 "jdbc_hook": { 

53 "JdbcHook": "airflow.providers.jdbc.hooks.jdbc.JdbcHook", 

54 "jaydebeapi": "airflow.providers.jdbc.hooks.jdbc.jaydebeapi", 

55 }, 

56 "mssql_hook": { 

57 "MsSqlHook": "airflow.providers.microsoft.mssql.hooks.mssql.MsSqlHook", 

58 }, 

59 "mysql_hook": { 

60 "MySqlHook": "airflow.providers.mysql.hooks.mysql.MySqlHook", 

61 }, 

62 "oracle_hook": { 

63 "OracleHook": "airflow.providers.oracle.hooks.oracle.OracleHook", 

64 }, 

65 "pig_hook": { 

66 "PigCliHook": "airflow.providers.apache.pig.hooks.pig.PigCliHook", 

67 }, 

68 "postgres_hook": { 

69 "PostgresHook": "airflow.providers.postgres.hooks.postgres.PostgresHook", 

70 }, 

71 "presto_hook": { 

72 "PrestoHook": "airflow.providers.presto.hooks.presto.PrestoHook", 

73 }, 

74 "samba_hook": { 

75 "SambaHook": "airflow.providers.samba.hooks.samba.SambaHook", 

76 }, 

77 "slack_hook": { 

78 "SlackHook": "airflow.providers.slack.hooks.slack.SlackHook", 

79 }, 

80 "sqlite_hook": { 

81 "SqliteHook": "airflow.providers.sqlite.hooks.sqlite.SqliteHook", 

82 }, 

83 "webhdfs_hook": { 

84 "WebHDFSHook": "airflow.providers.apache.hdfs.hooks.webhdfs.WebHDFSHook", 

85 }, 

86 "zendesk_hook": { 

87 "ZendeskHook": "airflow.providers.zendesk.hooks.zendesk.ZendeskHook", 

88 }, 

89} 

90 

91add_deprecated_classes(__deprecated_classes, __name__)