BigData / Apache Airflow Interview Questions
What is an Airflow Connection?
A Connection stores credentials and endpoint information for external systems such as databases, cloud providers, and APIs. Rather than hardcoding credentials in DAG code, you store them in Airflow's metadata database (or a secrets backend) and reference them by a conn_id.
Example — reading a Postgres connection:
from airflow.hooks.postgres_hook import PostgresHook hook = PostgresHook(postgres_conn_id='my_postgres') records = hook.get_records('SELECT * FROM users LIMIT 10')
Connections can be managed via the UI, CLI, or environment variables prefixed with AIRFLOW_CONN_.
More Related questions...