home
diamond Go Premium
Data Engineering Path  ·  Airflow
Apache Airflow Logo

Theoretical Quiz — Module 1

📝 Test Your Understanding

Answer these questions to validate your understanding of Airflow's core concepts. Try to answer without looking back at the material.


Q1. What does the acronym DAG stand for, and why is the "Acyclic" property important?

Show Answer

Directed Acyclic Graph. The "Acyclic" property is critical because it prevents infinite loops. If task A depends on task B which depends on task A, the pipeline would never complete. The acyclic constraint ensures every workflow has a clear start and end.


Q2. Explain the difference between the Control Plane and Data Plane in the context of Airflow. Give an example.

Show Answer
  • Control Plane (Airflow): Orchestrates when and in what order tasks run. Uses minimal compute resources. Example: Airflow scheduler triggers a task at 6 AM.
  • Data Plane (External Systems): Actually processes the data. Uses heavy compute. Example: Apache Spark processes 500 GB of data.

Airflow sends a spark-submit command (control plane) → Spark runs the job (data plane).


Q3. Name the 5 core components of Airflow's architecture and describe each in one sentence.

Show Answer
  1. Scheduler — Monitors DAGs and triggers tasks based on schedules and dependencies
  2. Webserver — Provides the UI for monitoring DAG runs and task states
  3. Workers — Execute the tasks dispatched by the scheduler
  4. Metadata Database — Stores all state, configuration, connections, and history
  5. Triggerer — Handles deferrable tasks efficiently without blocking workers

Q4. What are 3 key advantages of Airflow over cron jobs?

Show Answer
  1. Dependency management — Tasks only run when upstream dependencies succeed
  2. Rich monitoring UI — Grid, Graph, and Gantt views for real-time pipeline visibility
  3. Automatic retries and alerting — Self-healing pipelines with email/Slack notifications

Q5. What is XCom and when should you use it? When should you NOT use it?

Show Answer

XCom (Cross-communication) allows tasks to exchange small messages (metadata, row counts, file paths).

  • Use for: Passing file paths, row counts, status flags, small config values
  • Don't use for: Passing large datasets (DataFrames, raw files). Use external storage (S3, GCS) instead.

XCom values are stored in the metadata database, so passing large data will cause database bloat and performance issues.


Q6. Explain the difference between Operator, Sensor, and Hook in Airflow.

Show Answer
  • Operator: A template for a task that performs an action (e.g., PythonOperator runs Python code, BashOperator runs shell commands)
  • Sensor: A special type of operator that waits for a condition to be true (e.g., S3KeySensor waits for a file to appear in S3)
  • Hook: A low-level interface for connecting to external systems (e.g., PostgresHook manages database connections). Hooks are used inside operators.
lock

This content is reserved for Premium Members.

Upgrade to Premium

Entity Details

Create New Item

help

Submit Technical Query

Have a question or run into an issue? Describe it below, upload an optional screenshot, and our engineering team will answer it!

image Attach image (optional)

Submit Feedback

build Free Developer Utility Free Tool
gavel

Privacy & Legal Disclaimer

1. Client-Side Browser Processing

All utility tools on DeepEngineerHub (including Image to PDF, Text Formatters, JSON Converters, and Encryptors) execute 100% locally within your client browser using WebAssembly and JavaScript. No uploaded images, text, or documents are transmitted, collected, or stored on remote servers.

2. Limitation of Liability ("As-Is" Provision)

Tools and services are provided free of charge for convenience and educational purposes "as-is" without warranties of any kind. DeepEngineerHub shall not be held liable for any data loss, formatting inconsistencies, or indirect damages resulting from tool usage.

3. Open Source & Third-Party Software

Certain utilities utilize open-source client libraries (such as jsPDF, Mermaid.js, Pyodide) licensed under MIT, Apache, or BSD open licenses. All intellectual property remains with their respective copyright holders.