Examples of Data Contracts
This folder contains example data contracts illustrating each section of the Open Data Contract Standard. Most files are excerpts that exercise a single feature; the full examples put many features together in a single contract.
Every YAML file here validates against schema/odcs-json-schema-latest.json.
Table of contents
- Full examples
- Fundamentals
- Schema
- Data types
- References & relationships
- Data quality
- Servers
- Pricing
- Team (formerly stakeholders)
- Roles
- Service-level agreement
- Support & communication channels
- Authoritative definitions
- Tags
- Custom & other properties
Full examples
End-to-end contracts that combine many sections.
- Full example — covers fundamentals, schema with relationships and an enum, a map property, quality, pricing, team, support, roles, SLA, servers, and custom properties.
- PostgreSQL AdventureWorks
Fundamentals
Top-level contract identification (apiVersion, id, name, version, status, domain, dataProduct, description).
Schema
Objects, properties, primary keys, partitioning, and the v3.2.0 logical types.
- All schema types
- Table with single column
- Table with columns and partitioning
- Kafka schema
- Kafka schema (Schema Registry)
- Enumerations (RFC 0033, v3.2.0+) —
enumarrays on string and integer properties with labels, tags, descriptions, custom properties, and authoritative definitions on individual entries. - Maps (RFC 0030, v3.2.0+) —
logicalType: mapfor string→string, string→int, string→object, and string→arrayshapes.
Data types
References & relationships
Foreign-key relationships at property level, schema level, composite, and via shorthand notation (RFC 0026).
Data quality
Servers
Per-server-type connection metadata.
Pricing
- Basic pricing —
priceAmount,priceCurrency, andpriceUnit.
Team (formerly stakeholders)
Owners, stewards, and contributors of the data contract. Pre-v3.x of the standard called this section stakeholders; from v3.x onward the canonical name is team. Both shapes are still accepted by the schema, but the legacy stakeholders array structure is deprecated and will be removed in ODCS v4 — new contracts should use the team object.
- Team (modern, RFC 16 —
teamobject with members, descriptions, dateIn/dateOut transitions, per-member metadata) - Stakeholders (legacy
stakeholdersarray — pre-v3.x shape)
Roles
Service-level agreement
Support & communication channels
All recommended tool values (email, slack, teams, discord, ticket, googlechat) and the four scope values (interactive, announcements, issues, notifications).
Authoritative definitions
Linking the contract — at root, element, and property scope — to external sources of truth (business glossaries, dbt models, video tutorials, canonical URLs, etc.).
Tags
Lightweight classification labels at every supported scope: contract root, schema element, schema property, enum value, quality rule, team, and team member.
Custom & other properties
Free-form customProperties arrays at root, element, and property scope, plus the standard contractCreatedTs field.
Validating an example locally
The negative-test scripts under src/script/ use ajv; for a one-off positive validation, any JSON Schema validator that supports draft 2019-09 will do. Example with Python jsonschema: