Skip to content

PostgreSQL_End_to_End: the complete example of the "FundsXML in production" films - #39

Merged
karlkauc merged 2 commits into
mainfrom
feat/postgres-end-to-end
Nov 26, 2026
Merged

karlkauc merged 2 commits into
mainfrom
feat/postgres-end-to-end

Conversation

@karlkauc

Copy link
Copy Markdown
Contributor

What

A new folder PostgreSQL_End_to_End/ with everything the production films build on (download as a whole):

  • DDL (ddl/01…09): every repeating node of FundsXML is a row: several funds per file, umbrella and subfunds, several NAV natures and currencies per day, many NAV dates, portfolios with positions and look-through, share-class flows and distributions, trades and income, documents (linked or embedded), EMT/EET/TPT as XML plus key fields. Versioned by delivery (AMEND/DELETE), views for users, row-level security, code lists from the XSD.
  • Loader (loader/load.py): check → validate (XSD 1.1) → register → stream → link → codes → reconcile → release, landing folder with a report per rejected file.
  • Generator (generator/export.py): one streamed file per partner from partners.json, AMEND corrections, MAPPING.md.
  • Data: six deliveries (four funds in one file, daily estimated and official NAVs, documents, AMEND, DELETE), four bad files, golden exports. All fictitious (XMPL identifiers), generated by data/make_samples.py from the realistic samples.
  • CI: new job postgres-end-to-end runs run_all.sh against PostgreSQL 16 (load, reject, skip, correct, delete, reconcile, query, export, XSD 1.1, golden compare, round trip), checks that the samples are reproducible and that Schematron finds no errors.

basic_checks.sch: the NAV rules now compare per date and nature, and accept subfunds and several portfolios of the same date (they failed with an XPath type error on files with more than one NAV). Existing samples: unchanged results; the negative fixture still fails.

🤖 Generated with Claude Code

karlkauc and others added 2 commits November 26, 2026 22:37
… production" films

One folder with everything the films "FundsXML in a database", "Loading FundsXML files" and
"Generating FundsXML" show:

- ddl/: table model in which every repeating FundsXML node is a row (funds, umbrellas and
  subfunds, several NAV natures and currencies per day, portfolios, positions and look-through,
  flows, distributions, trades, income, documents linked or embedded, EMT/EET/TPT as XML plus
  key fields), versioned by delivery, views for users, row-level security, code lists from the XSD
- loader/load.py: check, validate (XSD 1.1), register, stream, link, codes, reconcile, release;
  landing folder with a report for every rejected file
- generator/export.py: one streamed file per partner from a partner register, AMEND corrections,
  mapping table
- data/: six deliveries (four funds in one file, daily estimated and official NAVs, documents,
  AMEND, DELETE), four bad files, golden export files
- run_all.sh, run in a new CI job against PostgreSQL 16

basic_checks.sch now handles repeating TotalAssetValues (several dates and natures), subfunds and
several portfolios of the same date; it used to fail on a file with more than one NAV.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s own UniqueIDs

The UniqueIDs of the sample deliveries are now fund code + number (GE_0001), so they visibly
differ from the database keys the generator writes (A346).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@karlkauc
karlkauc merged commit b4ce035 into main Nov 26, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant