Reference

Contract Data Model — Reference

The contract / agreement / spend data model with rationale for every decision — supplier resolution, document-vs-agreement split, obligation versioning, temporal modeling, spend integration. Plus 30+ SQL query patterns with discussion, fuzzy-join recipes, and schema-evolution playbooks.

Document ≠ agreementsupplieragreementdocumentobligation(versioned)spend ·invoices1 : nentityresolution(fuzzy joins)valid_from · valid_to → "as of" queries+ 30 SQL patterns · schema-evolution playbooks · dbt tests
How to use this

Two ways. Read end-to-end if you're designing a contract data layer from scratch — the chapters build a model piece by piece. Or use it as a query cookbook: skip to the patterns chapter and look up what you need. The chapter index above is the table of contents.