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
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...