Files
paulandClaude Opus 5 5a429ce175 Key Canonical Party's topics by the entity identifier
Every inbound and outbound topic now declares the column producers must key
messages by, and the stream tests assert it: a topic has three partitions, and
only messages sharing a key share a partition, so without the key two changes to
one party can be applied out of order.

Verified on digital-core: 65 smoke checks, 100 unit tests. Source-aligned
products on the Integration Bus publish to these topics under the same rule.

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

202 lines
7.7 KiB
YAML

# Canonical Party: data product manifest.
# Read by `uv run data-domain deploy|test|undeploy canonical-party`, run from the domain repository.
# Names every platform resource the product owns. Derived from the MD-DDL declaration
# named in `declaration`; see canonical_data_product/README.md in semprini-data-product-templates.
product:
name: "Canonical Party"
slug: "canonical-party"
domain: "digital-core"
declaration: "data_products/canonical.md"
version: "1.0.0"
owner: "data.architecture@example.com"
ods:
schema: "canonical_party"
tables:
# Parents, subtypes, children with foreign keys, association tables; the same order as
# ods/020_tables.sql, ods/040_seed.sql, lakehouse/010_replication.sql and trino/smoke.sql.
- name: "party"
entity: "Party"
key: "party_id"
- name: "address"
entity: "Address"
key: "address_id"
- name: "person"
entity: "Person"
key: "person_id"
- name: "company"
entity: "Company"
key: "company_id"
- name: "party_role"
entity: "Party Role"
key: "party_role_id"
- name: "customer"
entity: "Customer"
key: "customer_id"
- name: "contact_address"
entity: "Contact Address"
key: "contact_address_id"
- name: "party_role_contact_address"
entity: "Party Role Uses Contact Addresses"
key: "party_role_contact_address_id"
- name: "party_association"
entity: "Party Related To Party"
key: "party_association_id"
graphql:
endpoint: "/rpc/canonical_party_graphql"
smoke: graphql/smoke.graphql
events:
registry_group: "digital-core.canonical-party"
compatibility: BACKWARD
topics:
- name: "digital-core.canonical-party.party.inbound"
role: publish-input
key: "party_id" # producers MUST key by this: order holds per key, per partition
table: "party"
schema: events/schemas/party.schema.json
partitions: 3
cleanup_policy: delete
retention_ms: 604800000
- name: "digital-core.canonical-party.party.outbound"
role: subscribe-output
key: "party_id" # set by the Flink upsert-kafka sink
table: "party"
schema: events/schemas/party.schema.json
partitions: 3
cleanup_policy: compact
- name: "digital-core.canonical-party.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.canonical-party.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
- name: "digital-core.canonical-party.person.inbound"
role: publish-input
key: "person_id" # producers MUST key by this: order holds per key, per partition
table: "person"
schema: events/schemas/person.schema.json
partitions: 3
cleanup_policy: delete
retention_ms: 604800000
- name: "digital-core.canonical-party.person.outbound"
role: subscribe-output
key: "person_id" # set by the Flink upsert-kafka sink
table: "person"
schema: events/schemas/person.schema.json
partitions: 3
cleanup_policy: compact
- name: "digital-core.canonical-party.company.inbound"
role: publish-input
key: "company_id" # producers MUST key by this: order holds per key, per partition
table: "company"
schema: events/schemas/company.schema.json
partitions: 3
cleanup_policy: delete
retention_ms: 604800000
- name: "digital-core.canonical-party.company.outbound"
role: subscribe-output
key: "company_id" # set by the Flink upsert-kafka sink
table: "company"
schema: events/schemas/company.schema.json
partitions: 3
cleanup_policy: compact
- name: "digital-core.canonical-party.party_role.inbound"
role: publish-input
key: "party_role_id" # producers MUST key by this: order holds per key, per partition
table: "party_role"
schema: events/schemas/party_role.schema.json
partitions: 3
cleanup_policy: delete
retention_ms: 604800000
- name: "digital-core.canonical-party.party_role.outbound"
role: subscribe-output
key: "party_role_id" # set by the Flink upsert-kafka sink
table: "party_role"
schema: events/schemas/party_role.schema.json
partitions: 3
cleanup_policy: compact
- name: "digital-core.canonical-party.customer.inbound"
role: publish-input
key: "customer_id" # producers MUST key by this: order holds per key, per partition
table: "customer"
schema: events/schemas/customer.schema.json
partitions: 3
cleanup_policy: delete
retention_ms: 604800000
- name: "digital-core.canonical-party.customer.outbound"
role: subscribe-output
key: "customer_id" # set by the Flink upsert-kafka sink
table: "customer"
schema: events/schemas/customer.schema.json
partitions: 3
cleanup_policy: compact
- name: "digital-core.canonical-party.contact_address.inbound"
role: publish-input
key: "contact_address_id" # producers MUST key by this: order holds per key, per partition
table: "contact_address"
schema: events/schemas/contact_address.schema.json
partitions: 3
cleanup_policy: delete
retention_ms: 604800000
- name: "digital-core.canonical-party.contact_address.outbound"
role: subscribe-output
key: "contact_address_id" # set by the Flink upsert-kafka sink
table: "contact_address"
schema: events/schemas/contact_address.schema.json
partitions: 3
cleanup_policy: compact
- name: "digital-core.canonical-party.party_role_contact_address.inbound"
role: publish-input
key: "party_role_contact_address_id" # producers MUST key by this: order holds per key, per partition
table: "party_role_contact_address"
schema: events/schemas/party_role_contact_address.schema.json
partitions: 3
cleanup_policy: delete
retention_ms: 604800000
- name: "digital-core.canonical-party.party_role_contact_address.outbound"
role: subscribe-output
key: "party_role_contact_address_id" # set by the Flink upsert-kafka sink
table: "party_role_contact_address"
schema: events/schemas/party_role_contact_address.schema.json
partitions: 3
cleanup_policy: compact
- name: "digital-core.canonical-party.party_association.inbound"
role: publish-input
key: "party_association_id" # producers MUST key by this: order holds per key, per partition
table: "party_association"
schema: events/schemas/party_association.schema.json
partitions: 3
cleanup_policy: delete
retention_ms: 604800000
- name: "digital-core.canonical-party.party_association.outbound"
role: subscribe-output
key: "party_association_id" # set by the Flink upsert-kafka sink
table: "party_association"
schema: events/schemas/party_association.schema.json
partitions: 3
cleanup_policy: compact
flink:
job: flink/job.sql
name: "canonical-party"
lakehouse:
sync_group: ods
schema: "canonical_party"
trino:
catalog: lake
smoke: trino/smoke.sql