Makes the blog-generated product run on the digital-core domain built from
semprini-data-domain, with the same changes the canonical template received:
- flink/job.sql connects to ods:5432/ods as postgres with ${ODS_PASSWORD},
substituted by data-domain at submission, instead of the blog's credentials
- lakehouse/010_replication.sql uses the platform's `ods` sync group and grants
the lake tables to ducklake_reader and ducklake_writer
- product.yaml sync group, odps.yaml access URLs (domain ports 20000-20003,
management zone Apicurio on 8081), CLI names in comments
Adds tests/: the canonical template's generic unit tests and this product's
expectations.yaml (seed rows, 24 constraint rejections, 5 relationship
traversals, one inbound-to-tombstone round trip).
Verified on digital-core on 2026-09-18: 65 of 65 smoke checks, 100 unit tests
passing, and registered in OpenMetadata under the digital-core domain.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
20 lines
797 B
PL/PgSQL
20 lines
797 B
PL/PgSQL
-- Canonical Party: operational data store schema (runs on the ods service).
|
|
--
|
|
-- The product owns one PostgreSQL schema. pg_graphql reflects only the schemas on the
|
|
-- search_path, and the product's RPC endpoint (030_api.sql) sets the search_path to this
|
|
-- schema, so this is what scopes the GraphQL API to the product.
|
|
|
|
CREATE SCHEMA canonical_party;
|
|
|
|
COMMENT ON SCHEMA canonical_party IS E'@graphql({"inflect_names": true, "introspection": true, "max_rows": 100})';
|
|
|
|
-- Maintains updated_at on every row change. Used by all product tables (020_tables.sql).
|
|
-- updated_at is the freshness signal carried on the outbound topics and into the lake.
|
|
CREATE FUNCTION canonical_party.set_updated_at() RETURNS trigger
|
|
LANGUAGE plpgsql AS $$
|
|
BEGIN
|
|
NEW.updated_at := now();
|
|
RETURN NEW;
|
|
END
|
|
$$;
|