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

Providing the interfaces to the data

In this section, we’ll use the data contract to provision a Google BigQuery table. This will act as the interface to the data, through which the data generators will make their data available to the data consumers. We’ll learn how to use the contract and its schema to dynamically provision and manage those resources, keeping them in sync with the data contract.

This BigQuery table is the first of our contract-driven resources. To create it, we’ll need to convert our data contract to a custom JSON format that defines a BigQuery table and its schema (https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#TableSchema), as highlighted in the following diagram:

Figure 8.2 – Using the data contract to define and create a BigQuery table

Figure 8.2 – Using the data contract to define and create a BigQuery table

We’ll also need a way to send that JSON to the Google Cloud APIs, which will then create the table. To do that, we are going to make use of an...