Coverage for airflow.hooks: 89%

# Coverage for airflow.hooks : 89%

## 9 statements 8 run 1 missing 0 excluded

Hot-keys on this page

r m x p toggle line displays

j k next/prev highlighted chunk

0 (zero) top of page

1 (one) first highlighted chunk

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | # Imports the hooks dynamically while keeping the package API clean, # abstracting the underlying modules from airflow.utils import import_module_attrs as _import_module_attrs from airflow.hooks.base_hook import BaseHook as _BaseHook _hooks = { 'hive_hooks': [ 'HiveCliHook', 'HiveMetastoreHook', 'HiveServer2Hook', ], 'hdfs_hook': ['HDFSHook'], 'webhdfs_hook': ['WebHDFSHook'], 'mysql_hook': ['MySqlHook'], 'postgres_hook': ['PostgresHook'], 'presto_hook': ['PrestoHook'], 'samba_hook': ['SambaHook'], 'sqlite_hook': ['SqliteHook'], 'S3_hook': ['S3Hook'], 'http_hook': ['HttpHook'], 'druid_hook': ['DruidHook'], 'jdbc_hook': ['JdbcHook'], 'dbapi_hook': ['DbApiHook'], 'mssql_hook': ['MsSqlHook'], 'oracle_hook': ['OracleHook'], } _import_module_attrs(globals(), _hooks) from airflow.hooks.base_hook import BaseHook def integrate_plugins(): """Integrate plugins to the context""" from airflow.plugins_manager import hooks as _hooks for _h in _hooks: globals()[_h.__name__] = _h