MetroPulse Berlin is a small data pipeline for exploring Berlin’s public transport timetable. One Azure Data Factory run downloads two public datasets, saves both original files, and unpacks the timetable so I can analyze it. I used the extracted timetable in a local Python notebook to answer one question: how many departures were scheduled each hour at Berlin Hauptbahnhof?

Project architecture

MetroPulse architecture. ADF downloads the timetable and forecast into raw storage, extracts the timetable into staging after ingestion succeeds, and a local notebook charts departures from the extracted files.

The raw container holds the original VBB timetable ZIP and Open-Meteo forecast JSON. The staging container holds the individual timetable files. The forecast stays in raw. I downloaded the extracted timetable files for the separate notebook analysis.

The five ADF pipelines

PipelineWhat it does
pl_metropulse_dailyRuns ingestion, extraction, and stop validation in order.
pl_ingest_sourcesReads the source list with Lookup and calls the download pipeline once per source with ForEach.
pl_ingest_http_to_rawDownloads one file with Copy data and saves it to raw.
pl_prepare_vbb_staticReads the VBB ZIP from raw and extracts its files to staging.
pl_validate_vbb_stopsChecks the extracted stops.txt and writes accepted and quarantined rows separately.

ADF Studio canvas showing the parent pipeline’s two Execute Pipeline activities connected by a green success arrow

The original ingestion and extraction pipeline. The final three-stage version is shown below.

One configuration file drives both downloads

I put each source URL, destination prefix, and filename in a small CSV. ADF reads the CSV with a Lookup activity. A ForEach then passes each row to the same child pipeline. That child uses Copy data to land gtfs.zip and weather.json in the raw container under their respective prefixes.

ADF Studio canvas showing Lookup_Sources connected to ForEach_Source, with an Execute Pipeline activity inside the loop

Source ingestion in ADF Studio. The loop calls the same download pipeline for each row in the configuration file.

One run ID keeps ingestion and extraction in sync

The parent pipeline, pl_metropulse_daily, passes an ingestion_date and its own run ID to both child pipelines. It waits for ingestion to succeed before starting ZIP extraction. The run ID matters because several manual runs can share an ingestion date. Each gets its own folder, and the extraction step reads from that exact folder.

I configured the extraction source as Binary with ZipDeflate. The sink writes the individual GTFS files to staging, while the original ZIP stays in raw. This lets me inspect the input that produced a particular batch of extracted files.

A successful ingestion and extraction run

On 30 November 2026, ADF Monitor recorded both parent activities as Succeeded. These durations are from that run.

ActivityStatusDuration
Run_Source_IngestionSucceeded53 s
Run_VBB_ExtractionSucceeded27 s

What if a stop ID is missing?

A stop ID is how GTFS links a station or platform to its scheduled trips. Once extraction succeeds, the parent pipeline passes that run’s staged folder to pl_validate_vbb_stops. The validation reads stops.txt from that folder.

ADF parent pipeline showing successful ingestion, extraction, and stop validation

The Mapping Data Flow splits the rows into two streams. If stop_id is null, empty, or whitespace-only, the row goes to a quarantine CSV with a rejection reason. The remaining rows go to the accepted CSV. Keeping them separate makes it possible to review the rejected records while still retaining the original timetable.

ADF Mapping Data Flow showing accepted stop rows and rejected rows enriched with a reason before quarantine

The three green status checks show that ingestion, extraction, and validation completed in the captured run. The earlier durations apply to the two-step run above.

What the timetable can answer

I used a local Python notebook to ask how many departures were scheduled per hour at Berlin Hauptbahnhof. It selects stops and platforms under the station, filters trips using the service calendar and its date-specific exceptions, and counts timed departures where boarding is permitted. It also keeps GTFS times such as 25:00:00 with the Saturday service day, even though the clock has passed midnight.

Scheduled departures by hour at Berlin Hauptbahnhof, with after-midnight departures highlighted in orange

For the 28 November 2026 service day, the notebook counted 2,096 scheduled departures. The weather forecast stays in raw storage. The chart uses the timetable alone.

Failure, recovery, and alerting

I completed the recovery drill in Azure. I gave each validation attempt separate output folders, ran the validator with a deliberately missing file, then uploaded the fixture and reran validation with the same input folder. I used a separate failed run to test Azure Monitor email delivery. Read the recovery runbook.

Explore the MetroPulse case study or see the ADF definitions, configuration, and notebook on GitHub.