Skip to content
LakeBench
ProblemsCommunityPricing
Sign inStart practicing
Back
  1. Home
  2. Interview prep
  3. What is an Airflow Hook?

Airflow & DAGs · Core Concepts & DAGs

What is an Airflow Hook?

Easyairflow-07
hooksconnections

Question

What is an Airflow Hook, and how does it differ from an Operator?

Solution

A Hook provides a reusable way to connect to an external system (PostgresHook, S3Hook, HttpHook, …).

Hook     → How do I connect?
Operator → What do I want to execute?

Example: PostgresHook connects; PostgresOperator executes SQL using that connection pattern.

Hooks keep connection logic reusable inside operators or @task functions.

PreviousNext