Book Image

Driving Data Quality with Data Contracts

By : Andrew Jones
Book Image

Driving Data Quality with Data Contracts

By: Andrew Jones

Overview of this book

Despite the passage of time and the evolution of technology and architecture, the challenges we face in building data platforms persist. Our data often remains unreliable, lacks trust, and fails to deliver the promised value. With Driving Data Quality with Data Contracts, you’ll discover the potential of data contracts to transform how you build your data platforms, finally overcoming these enduring problems. You’ll learn how establishing contracts as the interface allows you to explicitly assign responsibility and accountability of the data to those who know it best—the data generators—and give them the autonomy to generate and manage data as required. The book will show you how data contracts ensure that consumers get quality data with clearly defined expectations, enabling them to build on that data with confidence to deliver valuable analytics, performant ML models, and trusted data-driven products. By the end of this book, you’ll have gained a comprehensive understanding of how data contracts can revolutionize your organization’s data culture and provide a competitive advantage by unlocking the real value within your data.
Table of Contents (16 chapters)
1
Part 1: Why Data Contracts?
4
Part 2: Driving Data Culture Change with Data Contracts
8
Part 3: Designing and Implementing a Data Architecture Based on Data Contracts

A Sample Implementation

In this chapter, we’ll walk through a sample implementation of data contracts. We’ll use it to illustrate the concepts we have been learning about throughout the book and put what we have learned into practice.

We’ll start by creating a YAML-based interface for the data generator to use to create a data contract. Then, using that data contract as the foundation, we’ll provide a few examples of how we can use it to drive our contract-driven architecture.

Firstly, we’ll create a table in our BigQuery data warehouse from the data contract, with a matching schema that will stay in sync with the contract as it evolves. We’ll also introduce an Infrastructure as Code (IaC) tool to help us build this. Then we’ll look at how we can create libraries for the data generators to aid the generation of data that matches the contract and conforms to the data quality checks we have defined in the contract.

Next, we’...