The demo

Two source families. Seven files. One star.

The demo is the grounding example for everything else on this site: what it is, why its numbers can be trusted, and how the system behaves against data that has the problems real data has. None of the data is the point. What was done to it is.

What you are looking at

The family at a glance.

A retail sample that relates to nothing else, kept on purpose, and an aviation family chosen because it carries, in miniature, the situations that make multi-source work hard. Three categories reach the star: invoice_lines from the retail table alone, flights from five aviation tables unified in silver, and airport_weather from the weather and reference tables.

SourceWhat it isRowsWhat it teaches
online_retail_iiInvoice lines of a UK online retailer, December 200945,228 in, 44,721 outduplicates as capture artifacts; cancellations retained and flagged; a category with no relations
nyc_flightsEvery scheduled departure from EWR, JFK, LGA, January to June 2013166,158cancellations as nulls; local clocks and a UTC key; a half-year window
nyc_weatherHourly ASOS observations at the three airports13,014gaps in a series; measurements null when not reported; units in names
nyc_airlinesThe carrier code lookup16a lookup whose names have aged
nyc_planesFAA registry rows for the tail numbers seen3,322a registry that does not know some entities
ourairports_airportsEvery airport with an IATA code, 20269,057a reference newer than the events; a code that moved
ourairports_runwaysThe runways of those airports, 202610,760an aggregate derived from a many-to-one reference

Every extract is public, cited, licensed for redistribution (CC0, public domain, CC BY 4.0), and pinned to a publisher commit and a raw digest. The register: docs/sources.md. The reasoning, join by join: docs/sources-explained.md.

Why it can be trusted

Every claim has a test that holds it.

The demo was built so that a stranger can check it without talking to anyone. These are the checks.

The bytes are the bytes.

Each fetch script refuses to run on raw bytes with any digest but the recorded one. The seven extracts reproduced byte-identically on two machines, and a gate holds each one to its README.

tests/test_committed_samples.py

One cold build, every test green.

From an empty warehouse, dbt builds 31 contracted models and runs 303 tests: shape enforced at compile time, content rules at contract-declared severity, the declared joins among them.

PASS=334 WARN=0 ERROR=0, docs/demo.md

Nothing was dropped on the way.

Row conservation holds to the digit through every plane: 166,158 flights in bronze, in silver, in the fact, and in the mart. Every one of the 3,439 departure hours is a calendar row the weather category minted too.

tests/test_aviation_conservation.py

The answers were measured first.

Seven questions, their SQL, and their answers are committed as a fixture and proven through the serving path, so what the demo guide says an agent should answer is what the warehouse answers.

tests/test_serving_questions.py

The joins, declared and measured.

Every join is declared on the contract with the completeness measured at the profile and the floor the rule enforces, so a reference refresh that adds coverage passes and one that loses it fails. Unresolved rows stay, with null attributes, and the expert context says why.

WhereJoinMeasured completenessFloor
silver_flightscarrier1.00001.00
silver_flightsaircraft0.83960.80
silver_flightsorigin1.00001.00
silver_flightsdestination0.97910.97
silver_airport_weatherairport1.00001.00
the starflights to origin weather (cross-category)0.99940.99

Re-measured on every run of the local lane by tests/test_declared_joins.py.

Ask it something

A cross-source question the star was built to answer.

The first question the demo guide tells you to ask, and the answer the serving path holds. The agent joins two categories on the conformed airport code and the conformed calendar hour, and it says which part of its answer is a measurement and which part an expert wrote.

you

Using the metricmine-gold tools: do flights departing New York in an hour with precipitation at their origin run later than flights in a dry hour, and are they cancelled more often? Say what you joined on and what the context told you.

tools
  1. list_fact_categories three categories, their typed marts, their registry keys
  2. get_context flights
  3. get_context airport_weather
  4. query one SELECT over the two typed marts
answer

Yes on both counts. In hours with precipitation at the origin, flights left 29.44 minutes late on average, and 8.95 percent were cancelled (13,492 flights). In dry hours, 12.42 minutes and 2.41 percent (152,569 flights).

What I joined on: the conformed airport code and the conformed calendar hour, the cross-category join the registry declares. What the context told me: that join's measured completeness is 0.9994, so 97 flights fall outside it; and departure delay is null exactly when a flight is cancelled, so the averages exclude cancellations by construction and the cancellation rate comes from the flag.

data
the two typed marts, joined as declared
expert context
the declared join and its completeness; the null rule on departure delay

Rendered from the measured answer in serving_questions.json (Q2), held by test_serving_questions.py. Not a screenshot.

Six more, with what to check for.

AskThe measured answer
Which carrier had the highest average departure delay, among carriers with at least 1,000 flights?ExpressJet (ev) at 23.41 minutes, cancellations excluded by construction.
At each origin, how much later do flights depart in hours with visibility under one mile than in ten-mile visibility?EWR 33.01 against 15.57 minutes; JFK 37.64 against 10.51; LGA 14.94 against 9.30.
How many flights went to Palm Beach (PBI), and why do they carry no destination name?3,471, and the reason is in the expert context: the 2026 reference codes it DJT.
Which manufacturers’ aircraft flew the most, and how old were they?Boeing (13.6 years), Embraer (9.3), Airbus (7.0); about 16 percent of flights resolve no aircraft, and the answer says so.
Which three countries have the most invoice lines in the retail sample?United Kingdom 42,354; Eire 596; Germany 417. The retail category shares nothing with the others but the star’s shape.
How many flights find no weather observation at their origin in their departure hour?97. The declared join’s completeness of 0.9994 says the same number as a rate.

Data and expert context, kept apart

The agent can tell a measurement from a claim.

Every registry entry keeps two things apart by name. data is derived from the contracts' typed declarations: each column's type and role, the grain, the conformed keys, the typed surface to query. expert_context is what people wrote: the subject, how to read the table, its limitations, its vintage, the joins with their measured completeness, and a meaning for every field. It opens with a note saying it is authored, not measured, and that where a claim and the data disagree, the data is the fact and the claim is what to check.

That split is the point of the multi-source demo. None of what follows is in the rows. All of it is in the registry, and an agent that reads the context before it queries answers correctly.

  • The weather table says that a null gust means no gust was reported, not zero.

  • The flights table says that a null arrival delay covers cancelled flights and 597 flights that departed with no arrival record.

  • The airport reference is a 2026 snapshot joined to 2013 flights, so Palm Beach flew as PBI and is coded DJT in the reference, and 3,471 flights carry no destination attributes on purpose. The contract declines to apply free-text keywords as a crosswalk, and the demo asks about it deliberately.

  • Carrier names are as published in 2013. Several carriers have merged or renamed since, and the context says so.

Run it

Two minutes to a served star.

macOS, Linux, or Windows x64, with git and uv. No API keys, no accounts, no cloud resources. Every tagged release ships the gold export as a release asset pinned by a committed digest manifest; make demo-fetch (uv run mm demo-fetch on Windows) downloads and verifies it.

git clone https://github.com/metricminellc/metricmine.git
cd metricmine
uv sync
make doctor
make demo-fetch
uv run python -c "from metricmine.query import GoldWarehouse; print(GoldWarehouse().list_fact_categories())"
git clone https://github.com/metricminellc/metricmine.git
cd metricmine
uv sync
uv run mm doctor
uv run mm demo-fetch
uv run python -c "from metricmine.query import GoldWarehouse; print(GoldWarehouse().list_fact_categories())"

Expected output: three categories, each with its fact table, row count, typed table, authored subject, and registry keys: airport_weather (13,014 rows), flights (166,158 rows), and invoice_lines (44,721 rows). Then wire the server into Claude Desktop and ask the question above. The wiring on both platforms, the full keyless replay from raw data (make demo, about eight minutes), and the troubleshooting are in docs/demo.md.

Next

Take the pattern home.