Skip to content
2022 Quandoo · Software & data

Market Catalog: from an empty warehouse to a monthly restaurant catalog

A 0-to-1 build for the sales team: the BigQuery warehouse and data model from an empty project, Beam pipelines and scrapers for 7 websites, a scraper rebuilt from 3 days to 45 minutes, retrained Vertex AI models, dashboards, alerting and reverse ETL to Salesforce.

Context
Quandoo, a restaurant reservation platform in Berlin
Role
Data Engineer, Market Catalog team
When
2021–2023

The situation

Quandoo hired me to build the Market Catalog from scratch: a monthly view of every restaurant in Quandoo’s markets, so the sales team could spot new openings, track changes and prioritise leads. There was no existing project, and the BigQuery project it would live in was empty.

Designing a warehouse from an empty project

I designed the Market Catalog warehouse in BigQuery, including the master table of restaurants that every source feeds into.

Building extraction pipelines for many sources

The catalog pulls from many websites every month, through APIs and scrapers. Each source is an Apache Beam pipeline on Dataflow, with CI/CD and tests in GitLab, dashboards in Google Data Studio and alerts on runs and data. The results go back into Salesforce, where the sales team works.

Refactoring a pre-existing scraper to optimise a three-day run down to 45 minutes

A pre-existing scraper ran as a single Kubernetes job on GKE. A full run took about three days, and it often failed on memory before finishing. When it failed, the catalog was late or incomplete, and a rerun cost another three days.

Why it was slow

The job did one thing at a time: open a page, read it, move to the next. But each restaurant page is independent of the others. This is work that can be split almost without limit, and the job wasn’t using that. Giving one pod more resources doesn’t change that.

So the fix was to change how the work was split, not to give it more resources.

The redesign

I redesigned the scraper as an Apache Beam pipeline on Google Dataflow, in three stages:

  1. Generate listing pages for each city: 76 cities across 13 countries.
  2. Extract restaurant URLs from every listing page.
  3. Scrape each restaurant profile: about 40 attributes, including address, location, contact details, price range, rankings, rating breakdowns, cuisines and reservation partner.

Dataflow spreads the last two stages across workers, scaling to more than 600 at peak.

Running a browser on hundreds of workers

The pages needed a real browser, so each Dataflow worker ran headless Chrome with Selenium inside a custom worker container. That brings its own problems, so I added guardrails:

Knowing what failed

A fast pipeline is only useful if you can trust its output. Every profile gets a row in a partitioned BigQuery status table, marked completed or failed, and failed profiles are reported after each run. The scraped data lands as JSON in GCS, one folder per run.

Three ways to run it

Shipping it safely

The pipeline is packaged as a Dataflow Flex Template. GitLab CI runs unit tests on every merge request, plus an end-to-end test that launches a real Dataflow job and checks that BigQuery matches the files in GCS. The same CI publishes the template and the container images.