Files
troupe-standup/wizard-work/ledger/2026-10-31-albums-photo-counts.md
T

1.3 KiB
Raw Blame History

Albums → Photos join (extract artifact) — ledger lane

Per-album table: which album, its author (userId), its title, and the number of photos it contains. One row per album.

Sources

  • https://jsonplaceholder.typicode.com/albums — 100 albums
  • https://jsonplaceholder.typicode.com/photos — 5000 photos

Join key: photos.albumId == albums.id.

Columns

Column Meaning
id album id (1–100)
userId album author
title album title
photo_count number of photos in the album

Result (100 rows)

  • 100 albums, 5000 photos, 100 distinct album ids.
  • photo_count is 50 for every album (uniform).

Artifacts (reproduced by extract_albums_photo_counts.py)

  • 2026-10-31-albums-photo-counts.csv — the table (CSV)
  • 2026-10-31-albums-photo-counts.json — the same table (JSON)

Verification (single command, exit 0 = correct)

Run from the repo root:

bash wizard-work/ledger/CHECK-albums-photo-counts

The check re-fetches both endpoints, re-derives the table, and compares the committed CSV and JSON against the fresh extraction (parsed, so line endings and quoting do not affect the verdict). It also asserts the row counts, the total photo count and the uniform photo_count claim above.