...

/

Hooks and Connections

Hooks and Connections

This lesson explores the use of hooks and connections.

We'll cover the following...

Airflow operators and sensors don’t operate in isolation; rather, they can connect to systems outside of Airflow, such as databases, cloud systems, remote machines, etc., using hooks and connections, which contain the necessary information required to connect to external systems.

Hooks

All hooks derive from the base class, BaseHook, defined here. Hooks are meant as an interface to interact with external systems. Popular hook implementations, such as MySqlHook, HiveHook, and PigHook return objects, can handle the connection and interaction to specific instances of these systems and expose consistent methods to interact with them. Hooks can also be used ...