
O’Reilly Book
Data Contracts
Developing Production-Grade Pipelines at Scale
"Poor data quality can cause major problems for data teams, from breaking revenue-generating data pipelines to losing the trust of data consumers. Despite the importance of data quality, many data teams still struggle to avoid these issues—especially when their data is sourced from upstream workflows outside of their control. The solution: data contracts. Data contracts enable high-quality, well-governed data assets by documenting expectations of the data, establishing ownership of data assets, and then automatically enforcing these constraints within the CI/CD workflow.
This practical book introduces data contract architecture with a clear definition of data contracts, explains why the data industry needs them, and shares real-world use cases of data contracts in production. In addition, you'll learn how to implement components of the data contract architecture and understand how they're used in the data lifecycle. Finally, you'll build a case for implementing data contracts in your organization."
Get the book
Try the Chapter 7 Sandbox on GitHub
Read the free chapter and work through its code examples. Build a data contract with Python, PostgreSQL, and JSON Schema, then use tests and CI/CD to detect contract violations before a database change is merged. It's available for free and fully online via Github Codespaces!
Explore Chapter 7 on GitHub ↗