Creating a data contract
We’ll start by defining a specification for data generators to create a data contract. We’ll discuss why we have chosen to define it in this way, and how it acts as the foundation of our sample implementation.
We’ll be using this data contract to drive the contract-driven architecture we’ll be building out in this chapter. It will be the foundation that drives the following resources and services:
- A BigQuery table, acting as the interface to the data.
- Code libraries for the data generators to use, by converting our data contract to JSON Schema and using existing open source libraries.
- A schema registry, so the schemas are available to others. Again, we used our JSON Schema representation of the data contract to interact with that.
- An anonymization service, which uses the data contract directly to anonymize some data.
The following diagram shows how each of these resources is driven by the data contract...