Files
semprini-data-product-templ…/canonical_data_product/odps.yaml
T
paulandClaude Opus 5 866bcfe238 Add the source-aligned CDC template, and key the canonical template's topics
The first template of the source-aligned family: one data product per source
system, capturing a database by CDC and turning what it emits into what a
canonical product accepts. It runs on the Integration Bus, not in a domain, and
is deployed with the `data-bus` CLI.

What it produces, and what its tests hold it to: raw topics in the source's own
shape; deterministic identity, so a re-snapshot upserts rather than duplicating;
validation against the canonical product's rules before publishing, with what
fails going to the product's own dead-letter topic with the reason; keying by the
canonical identifier; provenance in headers; and an archive in the bus object
store that can be replayed back onto the raw topic.

The worked example captures an ERP customer table and delivers into Canonical
Party in the digital-core domain: 12 smoke checks, 37 unit tests, including a
poison record that is quarantined while the next record still arrives.

The canonical template's topics now declare the key producers must set, which is
the other half of that contract.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-18 10:54:39 +12:00

105 lines
4.0 KiB
YAML

# Open Data Product Specification v4.0 manifest: the product's entry in the catalogue.
# The details, SLA, license and dataHolder blocks follow Agent Architect's odps-alignment
# mapping from the MD-DDL declaration. The dataAccess block is platform-specific and lists
# the product's four interfaces. Fields with TODO need business input outside the model.
schema: https://opendataproducts.org/v4.0/schema/odps.yaml
version: 4.0
product:
details:
en:
name: "{{product.name}}"
productID: "{{domain.slug}}.{{product.slug}}"
description: "{{product.description}}"
visibility: organisation
status: production # Draft -> draft, Active -> production, Deprecated -> sunset
type: dataset # domain-aligned -> dataset, consumer-aligned -> derived data, source-aligned -> raw data
productVersion: "{{product.version}}"
categories:
- "{{domain.name}}"
tags:
# >>> repeat per entity
- "{{entity.name}}"
# <<< end repeat
outputFileFormats:
- GraphQL
- JSON
- SQL
SLA:
declarative:
default:
name:
en: Default SLA
description:
en: "Service levels for {{product.name}}"
dimensions:
- dimension: uptime
displaytitle:
en: Availability
objective: "{{sla.availability_percent}}" # number, from sla.availability, e.g. 99.95
unit: percent
- dimension: updateFrequency
displaytitle:
en: Data Freshness
objective: "{{sla.freshness_minutes}}" # number: real-time -> 1, hourly -> 60, daily -> 1440
unit: minutes
support:
email: "{{product.owner}}"
dataAccess:
default:
name:
en: CRUD API
description:
en: "GraphQL reflected from the operational store by pg_graphql. Reads, inserts, updates and deletes on every entity."
outputPorttype: API
format: GraphQL
authenticationMethod: none # lab stack only
accessURL: "http://localhost:{{platform.graphql_port}}/rpc/{{product.schema}}_graphql"
publish:
name:
en: Publish Input
description:
en: "Kafka topics that accept canonical records, one per entity. JSON payloads conform to the schema registered for the topic, and each message is keyed by the entity's identifier, which is what keeps changes to one entity in order."
outputPorttype: API
format: JSON
authenticationMethod: none
accessURL: "kafka://localhost:{{platform.kafka_port}}/{{domain.slug}}.{{product.slug}}.<table>.inbound"
specsURL: "http://localhost:8081/apis/registry/v3/groups/{{domain.slug}}.{{product.slug}}/artifacts"
subscribe:
name:
en: Subscribe Output
description:
en: "Compacted Kafka topics carrying every change to each entity, keyed by identifier. Deletes are tombstones."
outputPorttype: API
format: JSON
authenticationMethod: none
accessURL: "kafka://localhost:{{platform.kafka_port}}/{{domain.slug}}.{{product.slug}}.<table>.outbound"
specsURL: "http://localhost:8081/apis/registry/v3/groups/{{domain.slug}}.{{product.slug}}/artifacts"
sql:
name:
en: Analytic SQL
description:
en: "Trino over DuckLake, continuously replicated from the operational store by pg_duckpipe."
outputPorttype: SQL
format: SQL
authenticationMethod: none
accessURL: "jdbc:trino://localhost:{{platform.trino_port}}/lake/{{product.schema}}"
license:
en:
scope:
definition: "TODO: purpose statement for the licence"
restrictions: "{{governance.classification}}. {{governance.restrictions}}"
permanent: false
exclusive: false
termination:
terminationConditions: "{{governance.retention}}"
governance:
confidentiality: "{{governance.confidentiality}}"
dataHolder:
en:
legalName: "TODO: organisation legal name"
email: "{{product.owner}}"