Run Mbak Mega's real Airflow DAGs through the night so the Pasar Induk price board is right by dawn. 14 levels, right in the browser.
Apache Airflow runs pipelines on a schedule. A DAG is a set of tasks with arrows between them, written as one Python file. The scheduler reads DAGs, makes a run each time a schedule comes due, then runs every task whose arrows are satisfied. At Ms. Mega’s desk, every night is run by the real Airflow 3.3.2 scheduler on a fixed clock, and the board shows what really happened.
Every scheduled run has several times. The data interval (data_interval_start to data_interval_end) is the stretch of data the run is responsible for. The logical date is the run’s label, the same as the start of its interval. A run may only start once its interval is over. Airflow keeps all of these in UTC, while these markets live in WIB, seven hours ahead.
XCom is how Airflow tasks pass values to each other. A value a task returns is kept in Airflow’s metadata database, then read by another task. XCom is meant for small values: a date, a row count, a file name. Big data stays in the store or in files, and the next task reads it from there.
The simplest data quality check is one SELECT that looks for rows that break a rule: it passes when it finds zero rows. Every check has a consequence. An error stops the pipeline or moves its rows to quarantine; a warn is recorded and reported, and the pipeline carries on.
As teams grow, pipelines split up, and what connects them are assets: tables or files one pipeline makes and another reads. In Airflow 3 the task that writes an asset names it in outlets, and a DAG that waits for it names it in schedule. Each team keeps its own DAG, on a schedule that follows the data, not the clock.
A sensor is a task that waits for something to happen, such as a file appearing in a folder. It checks, sleeps, then checks again. An event is the opposite: the source says when it is ready, and the pipeline reacts once. Use an event when the source can announce itself, a sensor when it cannot.