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 6. The Data Contract Components: Detection and Prevention

In Chapter 5, we provided an overview of the data contract components and discussed in detail the role of data assets and contract definitions within the data contract architecture pattern. In this chapter, we will provide an overview of all the architecture components and then spend subsequent sections focusing on the detection and prevention components of data contracts. By the end of this chapter, you will have a solid foundation of what you need in order to implement the data contract architecture—which we will do through a guided coding project in Chapter 7.

Recall from Chapter 5 that data contract architecture requires using a toolbox of infrastructure, with each component broken up into four main categories and their respective subcategories (you can refer back to Figure 5-1 for a visual representation):

Data assets

The foundation of all data infrastructure is databases, and while the range of databases is vast, we will focus on the following four categories for this book:

  • Analytics databases

  • Transactional databases

  • Event sourcing and event streams

  • First-party data, third-party platform

Contract definition

The surface to embed the expectations around schema and business logic (i.e., semantics) for a respective data asset, which is then compared to centralized sources of metadata. The three components are as follows:

  • Data contract spec

  • Business logic

  • Schema registry and data catalogs

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

Publisher Resources

ISBN: 9781098157623Errata Page