Skip to Content
Data Contracts
book

Data Contracts

by Chad Sanderson, Mark Freeman, B. E. Schmidt
November 2025
Intermediate to advanced
348 pages
10h 44m
English
O'Reilly Media, Inc.
Content preview from Data Contracts

Chapter 7. Implementing Data Contracts

Chapters 5 and 6 covered the four components of the data contract architecture in depth. In this chapter, we’ll move from theory to actually implementing data contracts via open source tools. Our corresponding GitHub repo provides a full sandbox environment you can run locally or in the browser via GitHub Codespaces with:

  • A full walkthrough of a data contract architecture implementation and its corresponding scripts

  • Implementation of a data contract spec

  • A scenario project simulating a data contract violation workflow

While we highly encourage using the code repository, this chapter is sufficient as a stand-alone, featuring architecture diagrams, the corresponding tools, and highlights of relevant code snippets. The goals of this chapter are for you to:

  • Understand how to implement the four data contract components: data assets, data contract spec, detection, and prevention

  • Create a data contract spec via JSON Schema as a means to understand how to evaluate available specs on the market or whether to build one of your own for specific use cases

  • Learn how to leverage the metadata of databases to create your own “data catalog” that you will compare data contract specs to

  • Embed data contracts within unit tests for local testing and embedding within the CI/CD workflow

  • Fully walk through the data contract violation workflow on a pull request

Finally, we suggest the following three ways to work through the material in this chapter, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Driving Data Quality with Data Contracts

Driving Data Quality with Data Contracts

Andrew Jones
Data Governance: The Definitive Guide

Data Governance: The Definitive Guide

Evren Eryurek, Uri Gilad, Valliappa Lakshmanan, Anita Kibunguchy-Grant, Jessi Ashdown
Data Quality Fundamentals

Data Quality Fundamentals

Barr Moses, Lior Gavish, Molly Vorwerck

Publisher Resources

ISBN: 9781098157623Errata Page