airflow.hooks.base_hook

Module Contents

airflow.hooks.base_hook.CONN_ENV_PREFIX = AIRFLOW_CONN_[source]
class airflow.hooks.base_hook.BaseHook(source)[source]

Bases: airflow.utils.log.logging_mixin.LoggingMixin

Abstract base class for hooks, hooks are meant as an interface to interact with external systems. MySqlHook, HiveHook, PigHook return object that can handle the connection and interaction to specific instances of these systems, and expose consistent methods to interact with them.

classmethod _get_connections_from_db(cls, conn_id, session=None)[source]
classmethod _get_connection_from_env(cls, conn_id)[source]
classmethod get_connections(cls, conn_id)[source]
classmethod get_connection(cls, conn_id)[source]
classmethod get_hook(cls, conn_id)[source]
get_conn(self)[source]
get_records(self, sql)[source]
get_pandas_df(self, sql)[source]
run(self, sql)[source]

Was this entry helpful?