liveBook · Manning

Interval

As explained in Data Pipelines with Apache Airflow, Second Edition

A data interval is the bounded period of data associated with one scheduled DAG run.

A data interval is the bounded period of data associated with one scheduled DAG run. Airflow divides time using start_date, schedule, and optionally end_date, then runs the DAG after the interval has passed. This makes each run's input window explicit for incremental processing. section 3.4.4 section 3.0

An interval-based DAG run provides:

  • A start and end boundary, available through data_interval_start and data_interval_end. section 3.4.4
  • Execution at the interval's end rather than at its beginning. section 3.4.3 section 3.4.4
  • A logical_date value that generally identifies the interval's start and can identify the run. section 3.4.4

Daily and two-day intervals

With a daily schedule starting on 2024-01-01, the first interval is processed shortly after 2024-01-01 23:59:59, with execution occurring at approximately 2024-01-02 00:00. A DeltaIntervalTimetable using a two-day duration instead runs once every two days and exposes the corresponding interval boundaries. section 3.4.4 section 3.4.3

Listing 3.13 Defining a frequency-based schedule interval
import pendulum
...

with DAG(
    dag_id="03_timedelta",
    schedule=DeltaIntervalTimetable(pendulum.duration(days=2)),       #1
    ...
):
    ...

Use a frequency-based schedule when the interval should repeat at a fixed duration, such as every two days. section 3.4.3

How Data Pipelines with Apache Airflow, Second Edition covers it

How deep it goes
Defines boundaries, execution timing, and Airflow variables, stopping short of deeper implementation internals.
Examples
Uses daily intervals, two-day DeltaIntervalTimetable schedules, and aligned 15-minute taxi and bike-data windows.
What it assumes
Assumes basic DAG and scheduled-interval knowledge while introducing interval-based incremental processing and run timing.
What you can do after
Apply it via Airflow schedule settings and data_interval_start/data_interval_end to process bounded data windows.
How it connects
Connects interval processing with DAG scheduling, backfilling, incremental data processing, cron expressions, and logical dates.

Also explained in

Compare how 7 books explain interval →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Data Pipelines with Apache Airflow, Second Edition. The section links point to the parts of the book it draws on.