Practice — Hot · The Recipe Review
Ungraded. This is a review exercise: you are handed a finished recipe and asked what is wrong with it. In working teams, reviewing queries is as common as writing them.
Scenario
A teammate proudly hands off their cleanup of customer_export.csv before leaving
for vacation. "All done — 423 rows, fully cleaned, types set." Their Applied Steps list reads,
in this order:
| # | Step | Their note |
|---|---|---|
| 1 | Source · Promoted Headers · Changed Type | (automatic) |
| 2 | Removed Duplicates — Name column only | "customers should be unique" |
| 3 | Replaced Values: Segment, N/A → null (typed as text) | "nulled the N/As" |
| 4 | Changed Type: Joined → Date | "dates working" |
| 5 | Replaced Values: State, Texas → TX | "fixed the states" |
Something should already feel wrong: the lesson's cleanup of this same file ends at 500 rows, and theirs ends at 423.
Your review
- Explain the 423. Rebuild their recipe faithfully (yes, including the mistakes) and account for the seventy-seven missing rows. Who are they? Use the time-machine trick — click each step and watch the row count.
- Audit every step. For each of steps 2–5, write one sentence: correct as is, incomplete, or wrong — and the concrete consequence downstream. Two of the four contain defects the column profile will confess instantly; one is merely unfinished; think hard about whether step 4's position in the order is an accident.
- Write the fix. Rebuild the recipe properly (your Mild recipe is most of it) and list, for the vacationing teammate, the diff: which of their steps you kept, changed, reordered, or removed, and why. Professional tone — this person reviews your queries next month.
Hint — the seventy-seven rows
500 unique rows minus 423 is 77 — a number large enough to be its own clue: in a 500-person file, how rare are shared names, really? Click their Removed Duplicates step and compare the count against the all-columns version from the lesson. Then check whether "Avery Thorne" and "Avery Thorne " (trailing space) survived as a pair, and ask what that means their dedup missed at the same time it was over-deleting.
Reflection
- The teammate's five steps all ran without a single error message. Which lesson theme is that?
- What one-minute habit, done before step 2, would have prevented the worst defect?