Schema contract
An ODCS contract that declares the columns of a BigQuery table, checked against the node's columns on the graph.
Use it when Downstream jobs break when a column disappears, and you want to know first.
apiVersion: v3.1.0
kind: DataContract
id: acme-orders
name: acme_orders
version: 1.0.0
status: active
domain: sales
schema:
- name: orders
physicalName: orders
physicalType: table
properties:
- name: order_id
physicalType: STRING
logicalType: string
required: true
primaryKey: true
- name: amount
physicalType: NUMERIC
logicalType: number
required: true
- name: ordered_at
physicalType: TIMESTAMP
logicalType: date
required: true
customProperties:
- property: nodeId
value: BigqueryTable_acme-data-prod.sales.orders
Taken from docs/integrations/odcs.md
The properties of the first schema object are the contract's columns, and required: true makes a column
non-nullable. Nistor turns them into the contract's schema dimension, checked against the node's columns in the
graph. The dimension breaches when a declared column is missing; extra columns are allowed.
Push the file from CI with nistor odcs sync, and it is imported as a code-managed, locked contract. Data Trust
evaluates it every 30 minutes. A breach opens a contract breach and an incident, and the recovery resolves both.