May we use cookies so Meta, Google, LinkedIn and ChatGPT see your visit and we learn which ads work? PrivacyMay we use cookies to see which pages help, and let Meta, Google, LinkedIn and ChatGPT see your visit, so we know which of our ads work? That way we spend less on ads that do not work. We do not sell your data, and the site works the same if you decline. You can change your answer at any time under Cookie settings at the foot of the page. Privacy policy
Loading...
AI Engineering · Data Engineering For Ml
Free preview: the first 2 parts of this 27-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
Generative AI and Agentic AI Engineering
Unlock this lesson and the 208 other paid lessons
$35 once, by card or PayPal
See the Generative AI and Agentic AI courseread the rest of this lesson in
Generative AI and Agentic AI Engineering
Unlock this lesson and the 208 other paid lessons
$35 once, by card or PayPal
See the Generative AI and Agentic AI coursein Data Engineering For Ml
This lesson is part of the AI Engineering course. Unlock the full course, a separate one-time payment, for lifetime access.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime AccessFoundation lessons of this course are free, no payment needed. Try them now
A kitchen buys flour from a supplier. Each delivery comes with a note: a line that says "flour", then a number. The kitchen's system reads the note, checks that each line has a name and a number, and orders the next batch from it.
One day the supplier changes its scales. It now counts flour in pounds, not kilograms. The note still says "flour, 25". The name is right, the number is a number, and every check the kitchen runs passes. The kitchen now has less than half the flour it thinks it has, and nobody finds out until the bread comes out wrong.

Nothing failed in that story. The note had the right shape, so every check said yes. The problem was in what the number meant, and no check looked at meaning.
Data that feeds a model has exactly this problem. Another team writes the data, and your model reads it. They can change it for good reasons, on their own schedule, and your checks may only look at its shape. In this lesson I measure which changes a shape check stops and which ones walk straight into a model, on twelve realistic changes and real data.
This is the tenth lesson of the chapter on data engineering for machine learning. Three earlier lessons touch the same ground, and I build on them rather than repeat them.
Lesson 2, on data ingestion pipelines, renamed a column upstream and watched pandas fill it with empty values that became 0, with no error. A check on column names caught it. Lesson 5, on data validation, measured range, category and consistency checks on real weather data, and their false alarms. Lesson 6, on data versioning, kept versions of the data itself.
This lesson is about the step before all of that. It is the agreement between the team that writes the data and the teams that read it. It is also about the tools that check a change to that agreement before it ships.
What this rebuild corrected. An earlier version of this lesson made claims its sources do not support. Each is fixed where it comes up, and the full record is in
results/ctr-factcheck.json.
- It said a schema registry "rejects events that break the schema". A registry checks schemas, not messages.
- It said a rename is safe in no compatibility mode. Avro readers can rename with an alias, a second name the reader accepts for a field. Protobuf's binary format does not carry names. And the lab below shows a rename passing every mode, which is worse, not safer (see the slide on defaults).
- It said BACKWARD is "the safest" mode. It is the default; FULL_TRANSITIVE is the strictest.
- It said "most large organizations" use FULL, and that Airbnb's work was about unannounced upstream changes. I found no source for either, so I cut the first and corrected the second.

The plan runs from top to bottom. First what a contract is, and the rules a registry checks. Then the lab, which replays twelve changes and measures what each mode let through. Last, what a shape check cannot see, and how to make a change that no mode allows.