Skip to main content
πŸ“˜ Complete PDF

Apache Airflow Certification Practice Test 01

Foundation Questions

Question 1 of 20
πŸ“‹ Multiple Choice
Question 1
A newly joined Data Engineer at a retail company notices that nightly ETL jobs execute in a predefined sequence with clear dependencies. Management wants these workflows defined as code, scheduled, and monitored from a central platform. What core Apache Airflow concept represents this entire workflow?
A. Task Pool
βœ“
B. Directed Acyclic Graph (DAG)
C. Cross-Communication (XCom)
D. Airflow Variable
Answer
βœ… B. Directed Acyclic Graph (DAG)
Explanation

1. Direct Confirmation & Core Rule In Apache Airflow, a Directed Acyclic Graph (DAG) is the core abstraction representing a collection of all tasks organized by their relationships and execution dependencies.

2. Why This Answer Is Correct A DAG represents workflow logic authored as Python code. It is: - **Directed**: Task execution flows in an explicit direction (Task A β†’ Task B). - **Acyclic**: Workflows cannot contain infinite loops or cyclic dependencies (Task A cannot depend on Task B if Task B depends on Task A). - **Graph**: Tasks and their relationships form a structured network of nodes and edges.

3. Why Other Options Are Incorrect - **A. Task Pool**: A concurrency management feature used to limit simultaneous task execution across shared resources (e.g. throttling connections to an operational database). - **C. Cross-Communication (XCom)**: A messaging mechanism used by tasks to pass small metadata payloads (e.g. record counts, file paths) to downstream tasks. - **D. Airflow Variable**: A key-value configuration storage mechanism in the metadata database for global runtime settings.

4. Architectural & Execution Context DAG definitions are placed in Python files inside the `dags/` folder. The Airflow Scheduler continuously parses these files, creates `DagRun` entries in the metadata database, evaluates task dependencies, and queues eligible tasks for execution.

5. Practical Code Example

from datetime import datetime, timedelta
from airflow import DAG
from airflow.operators.empty import EmptyOperator

with DAG(
    dag_id="retail_nightly_etl",
    start_date=datetime(2026, 1, 1),
    schedule_interval="@daily",
    catchup=False,
    default_args={"retries": 2, "retry_delay": timedelta(minutes=5)}
) as dag:
    start = EmptyOperator(task_id="start")
    end = EmptyOperator(task_id="end")
    start >> end

6. Real-World Engineering Scenario A retail data platform extracts orders from Shopify, inventory from SAP, transforms both datasets in Snowflake, and sends a Slack notification upon completion. Structuring this as an Airflow DAG guarantees that the transformation step never starts until both extract steps succeed.

7. Common Exam Trap & Misconception A DAG file defines the workflow structure and dependencies, but it should NOT contain heavy data processing logic at the top level of the Python script. Heavy computations belong inside operator execution callables.

8. Best Practice & Production Recommendation Keep top-level code in DAG files lightweight. Avoid calling REST APIs or querying databases outside of task operators to avoid blocking the Scheduler's parsing loop.

9. Key Concept to Remember DAG = The complete workflow graph (Directed Acyclic Graph) defined as Python code.

10. Related InsightfulSaga Tutorial πŸ‘‰ [Airflow Architecture – Scheduler, Executor, Webserver & Workers](/tutorials/airflow/airflow-architecture)

Answered: 0 / 20
Question Navigator (Test 01)0% Answered