This site preserves educational material from a legacy archive focused on data warehousing and ETL operations. Originally developed to help organizations move beyond manual data management, the archived content emphasizes automated extraction, performance metric calculation, and trend discovery—goals that remain central to modern data engineering.
Key point 1. The preserved lessons address system architecture, process flow analysis, and the practical resolution of technical problems. While the original platform required Adobe Flash, the underlying concepts are timeless. This archive is maintained as an independent, non-commercial reference for learners and practitioners.
Key point 2. Regarding the common question—Airflow sensor vs. operator—the distinction is straightforward: an operator executes a defined task (e.g., running a query or transferring files), while a sensor waits for a specific condition to be true before proceeding. Use sensors for dependencies like file arrival or API readiness; use operators for the actual work. The archive’s historical emphasis on process flow analysis aligns directly with this decision.
Apache Airflow is a workflow orchestration platform where every task in a Directed Acyclic Graph (DAG) is an instance of an Operator, and every Operator can optionally contain one or more Sensors. The distinction between the two is fundamental, yet frequently misunderstood. This guide explains what each component does, when to use one over the other, and how to avoid the most common pitfalls that lead to stuck DAGs, wasted resources, and confusing logs.
Key point 4. What Is an Operator?
Key point 5: An Operator defines a single, atomic unit of work. It executes a specific action and then finishes. Examples include:
Key point 6. - `PythonOperator` – runs a Python callable.
Key point 7. Operators are designed to be idempotent where possible: running them twice should produce the same result or a safe no-op. They run once per task instance, and their success or failure is recorded in the Airflow metadata database.
Key point 8. What Is a Sensor?
Key point 9. A Sensor is a special type of Operator that waits for a condition to become true before it completes. It does not perform the actual work; it only checks for readiness. Common examples:
Sensors have two execution modes:
Decision Criteria: Sensor vs. Operator
The core question is: Does your task need to wait for an external condition, or does it need to perform an action?
Use a Sensor when:
Use an Operator when:
Often you need both. The correct pattern is:
Key point 16
Do not try to make an Operator wait by adding `time.sleep()` inside a Python callable. That blocks a worker slot and makes the DAG hard to monitor. Instead, use a sensor as a separate task.
Mistake 1: Using a Sensor for a Short, Predictable Wait.
If you know a file will appear within 10 seconds, a sensor with a 60‑second poke interval adds unnecessary latency. In that case, you might be better off with an operator that retries a few times. However, if the wait is truly unpredictable, a sensor is still the right choice – just set a short `poke_interval` (e.g., 5 seconds) and a reasonable `timeout`.
This independent educational reference summarizes general technical concepts. Verify current standards, dimensions, and manufacturer specifications before making a procurement or engineering decision.