pipekit/config
Paul Trowbridge d0e72e270f Add the CMS AP subledger modules (avtx, vchr, open)
Completes the AP source layer: GP was covered by the pm* modules, but the
CMS side had only cms.vend. These three are what
SQL/fiscal/analysis/open_ap_aging.db2.sql actually joins.

  avtx  966,553  A/P voucher transaction events   incremental on AVTSTM
  vchr  792,348  vouchers entered, period to date full
  open  538,544  open payables; FHCBAL is live    full

AVTX is the artrn analog -- the per-event apply detail. It matters
because the AR aging in /opt/clean reconstructs balances from
application events rather than a single settle_date, so AP needs an
applications fact too, not just documents.

Grains verified exactly unique before drafting: AVTX
(avtco#,avtvh#,avttx#) 966,553/966,553; VCHR
(idcom#,idvch#,idbnk#,idfisy,idfisp) 792,348/792,348; OPEN
(fhcom#,fhvch#,fhpyy,fhpper) 538,544/538,544. All three reconcile
IN SYNC.

vchr and open stay full: no change signal, only business dates, and
FHCBAL is a live mutable balance.

Two things worth knowing for the next DB2 module:

- pipekit maps DB2 TIMESTMP to Postgres text, so a watermark resolver
  doing COALESCE(MAX(ts), TIMESTAMP '...') fails on mismatched types.
  Cast explicitly. cms.gtran was already the precedent.
- Watermarks resolve at engine step 2 but --create-dest builds the
  table at step 3b, so a watermark reading its own dest table fails on
  the first run. Pre-create the table or seed with a constant.

Note LGDAT.AP* is a dead end -- APVH has 14 rows, APVD has 22. CMS AP
does not live in AP-prefixed files.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-04 01:05:34 -04:00
..
modules Add the CMS AP subledger modules (avtx, vchr, open) 2026-09-04 01:05:34 -04:00
connections.json updates 2026-08-06 15:39:22 -04:00
drivers.json feat: version-control pipeline definitions via export/apply 2026-07-22 10:56:55 -04:00
groups.json Add the CMS AP subledger modules (avtx, vchr, open) 2026-09-04 01:05:34 -04:00