Files
semprini-data-product-templ…/canonical_data_product/example/product.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

55 lines
1.5 KiB
YAML

# Worked example: the template instantiated for a single entity, Address (entities/address.md),
# as a product called Example Address. It deploys and tests on the stack as-is and shows what a
# finished product directory looks like. A real product lists every entity in its declaration.
product:
name: "Example Address"
slug: "example-address"
domain: "digital-core"
declaration: "entities/address.md"
version: "1.0.0"
owner: "data.architecture@bank.com"
ods:
schema: "example_address"
tables:
- name: "address"
entity: "Address"
key: "address_id"
graphql:
endpoint: "/rpc/example_address_graphql"
smoke: graphql/smoke.graphql
events:
registry_group: "digital-core.example-address"
compatibility: BACKWARD
topics:
- name: "digital-core.example-address.address.inbound"
role: publish-input
key: "address_id" # producers MUST key by this: order holds per key, per partition
table: "address"
schema: events/schemas/address.schema.json
partitions: 3
cleanup_policy: delete
retention_ms: 604800000
- name: "digital-core.example-address.address.outbound"
role: subscribe-output
key: "address_id" # set by the Flink upsert-kafka sink
table: "address"
schema: events/schemas/address.schema.json
partitions: 3
cleanup_policy: compact
flink:
job: flink/job.sql
name: "example-address"
lakehouse:
sync_group: ods
schema: "example_address"
trino:
catalog: lake
smoke: trino/smoke.sql