The problem
Spain publishes its public tenders on PLACSP, the Public Sector Procurement Platform, and the EU publishes the larger ones on TED. Both feeds are made of notices: an announcement, then a correction, then an award. If you count the notices, you overstate what’s on offer. If you keep only the latest one, you lose the history that explains how a procedure got there.
For my master’s thesis I built a pipeline that keeps both. It stores every notice as history, works out the current state of each procedure, and derives a list of open opportunities from that. I also wanted to prove it was repeatable: the same inputs should give the same files every time.
It was my final project for the Master’s in Big Data, Data Science & AI at Complutense University of Madrid (2025–26), and it received 9.5/10.
The sources
The input is a bounded corpus, not the whole market. It has PLACSP Atom/XML feeds and TED JSON requested for January–June 2026, with TED filtered by country and technology terms. CPV codes classify what’s being bought.
Architecture and decisions
The pipeline follows raw → bronze → silver → gold:
- Raw keeps the downloaded bytes, with checksums and a record of where each file came from.
- Bronze parses them into typed records, and counts what it rejects instead of dropping it silently.
- Silver gives every notice a deterministic identity and keeps every revision. If two different records claim the same identity, the run fails rather than overwriting one with the other.
- Gold applies the opportunity rules to the current state of each procedure, which is calculated from Silver’s history.
DuckDB serves the analytical views and writes the final CSV exports, so the dashboard reads the rules’ output instead of reimplementing them. Each TED or PLACSP procedure keeps its source as part of its identity; the pipeline doesn’t pretend to merge the two.
Counts at different grains, on a shared linear scale. These are not funnel stages or conversion rates.
Silver events → current procedure states → policy-selected opportunities. Different units: the decrease is not a rejection rate. Fixed-input local runs; policy date 30 June 2026.
Source: real-run counts, independently checked in the reproducibility audit.
Polars does the local table work, including Silver, and Spark calculates current state and Gold. Before timing the engines, I checked that they produced the same output. On a synthetic workload of 25,363 input rows, every candidate produced the same 22,504 events.
Transformation seconds on one synthetic workload. Lower is faster. Startup and validation excluded; equivalent logical outputs.
Synthetic workload · single run · 25,363 input rows → 22,504 logical events for every engine. Read/transform/write included; engine startup and validation excluded. No error bars or scalability claim.
Source: engines-small-seed7-2026-09-16.json in the public repository.
At this size Polars was about 40 times faster than Spark. That’s one run of a small workload on one machine, so it doesn’t tell you how either engine would behave on a cluster.
What it does today
I ran the full pipeline twice on the same seven input files. Both runs produced 359,180 Silver events, 130,118 current procedures and 14,763 opportunities. All five final CSVs had identical SHA-256 hashes. Two later runs on newer code matched each other in the same way and gave the same counts.
“The two identical runs and the provenance controls give a concrete demonstration of reproducibility.”
Carlos Ortega, thesis evaluator (translated from Spanish)
The guarantee is deliberately narrow. It covers transforming fixed inputs locally, not downloading fresh data from sources that keep changing.
Eight divisions ranked by distinct procedures within each division. A procedure can count in several divisions.
One procedure can count in several divisions, so these bars cannot be added to get unique opportunities. The top eight are not exhaustive. Labels are shortened from the CPV reference vocabulary.
Source: reproducible aggregates from the real opportunity export and CPV 2008 reference codes.
The public repository contains the pipeline and the evidence from the real runs. To try it yourself, run bash examples/demo/run.sh from the repository root, as the README explains. The demo uses synthetic data, so it shows how the pipeline works without recreating the real corpus. This page only publishes aggregates.
Limits and what’s next
- 9,905 TED events can’t yet be linked to a procedure. They stay visible in the history but don’t reach current state, so every opportunity in this output comes from PLACSP.
- Opportunities have no publication date or deadline, so there’s no month-by-month view yet. “Open” means open according to the status rules; it isn’t proof that bids are still being accepted.
- The policy date is 30 June 2026, but the data was retrieved later, so the output doesn’t reconstruct what was known on that day.
- Category labels are empty in the latest export, so the category chart uses the official CPV reference names.
- It runs as a local batch job, with no schedule and no tested backfill.
Next I’d link the TED events to their procedures, take dates from the source documents, and test incremental updates and recovery from a failed run before putting the pipeline on a schedule.