pipekit/config/modules/marktable.sql
Paul Trowbridge dd9f89f4b5 feat: version-control pipeline definitions via export/apply
Add `pipekit export` / `pipekit apply` (pipekit/config_io.py) to serialise the
DB's config — drivers, connections, modules (+ columns, watermarks, hooks),
groups, schedules — to a git-trackable text tree under config/, and rehydrate
it. SQLite stays runtime state; definitions become diffable/reviewable/
revertible.

- config only: run_log/group_run/settings and per-run state columns excluded
- name-keyed refs (portable across databases); source_query in .sql sidecars;
  columns as real JSON arrays for line-by-line diffs
- newline-normalised so CRLF-vs-LF is never a spurious change
- apply is create/update by name; child collections fully synced; top-level
  deletes gated behind --prune; --dry-run prints the plan
- round-trip is identity (export -> apply --dry-run == nothing to do)

Commits the current config/ as the first baseline, capturing the freshly
populated columns_json for rm00101/rm00301/iv00101. Documented in SPEC.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 10:56:55 -04:00

83 lines
2.1 KiB
SQL

SELECT
RTRIM(M1PROD) AS m1prod,
RTRIM(M1SDES) AS m1sdes,
RTRIM(M1LDES) AS m1ldes,
RTRIM(M1MAJG) AS m1majg,
RTRIM(M1MING) AS m1ming,
RTRIM(M1MJSP) AS m1mjsp,
RTRIM(M1MNSP) AS m1mnsp,
RTRIM(M1TRDS) AS m1trds,
M1HSZE AS m1hsze,
RTRIM(M1CCFG) AS m1ccfg,
RTRIM(M1SYMB) AS m1symb,
RTRIM(M1TSLT) AS m1tslt,
RTRIM(M1STAT) AS m1stat,
M1WGHT AS m1wght,
RTRIM(M1WUNT) AS m1wunt,
M1MDCIU AS m1mdciu,
M1MLUUU AS m1mluuu,
M1ODU AS m1odu,
M1IDU AS m1idu,
M1HTU AS m1htu,
M1OWIU AS m1owiu,
M1OLIU AS m1oliu,
M1IWIU AS m1iwiu,
M1ILIU AS m1iliu,
RTRIM(M1PSU) AS m1psu,
M1PHU AS m1phu,
RTRIM(M1MDUOMU) AS m1mduomu,
RTRIM(M1MLUOMU) AS m1mluomu,
RTRIM(M1ODUOMU) AS m1oduomu,
RTRIM(M1IDUOMU) AS m1iduomu,
RTRIM(M1HUOMU) AS m1huomu,
RTRIM(M1OLWOMU) AS m1olwomu,
RTRIM(M1OLUOMU) AS m1oluomu,
RTRIM(M1IWUOMU) AS m1iwuomu,
RTRIM(M1ILUOMU) AS m1iluomu,
RTRIM(M1PHUOMU) AS m1phuomu,
M1MDCIM AS m1mdcim,
M1MLUUM AS m1mluum,
M1ODM AS m1odm,
M1IDM AS m1idm,
M1HTM AS m1htm,
M1OWIM AS m1owim,
M1OLIM AS m1olim,
M1IWIM AS m1iwim,
M1ILIM AS m1ilim,
RTRIM(M1PSM) AS m1psm,
M1PHM AS m1phm,
RTRIM(M1MDUOMM) AS m1mduomm,
RTRIM(M1MLUOMM) AS m1mluomm,
RTRIM(M1ODUOMM) AS m1oduomm,
RTRIM(M1IDUOMM) AS m1iduomm,
RTRIM(M1HUOMM) AS m1huomm,
RTRIM(M1OLWOMM) AS m1olwomm,
RTRIM(M1OLUOMM) AS m1oluomm,
RTRIM(M1IWUOMM) AS m1iwuomm,
RTRIM(M1ILUOMM) AS m1iluomm,
RTRIM(M1PHUOMM) AS m1phuomm,
RTRIM(M1TCPT) AS m1tcpt,
RTRIM(M1PCPT) AS m1pcpt,
RTRIM(M1HCPT) AS m1hcpt,
RTRIM(M1SCPT) AS m1scpt,
M1CBSQ AS m1cbsq,
M1BPQ AS m1bpq,
M1CBSP AS m1cbsp,
RTRIM(M1PAGE) AS m1page,
RTRIM(M1STKC) AS m1stkc,
RTRIM(M1FORMAT) AS m1format,
RTRIM(M1FORM_UOM) AS m1form_uom,
RTRIM(M1SHAPE) AS m1shape,
RTRIM(M1FUNC) AS m1func,
RTRIM(M1PRTGRP) AS m1prtgrp,
RTRIM(M1FEATURE) AS m1feature,
RTRIM(M1PRICEG) AS m1priceg,
RTRIM(M1FAMILY) AS m1family,
RTRIM(M1IMGURL) AS m1imgurl,
RTRIM(M1HEADER) AS m1header,
RTRIM(M1BIGGROUP) AS m1biggroup,
RTRIM(M1BASEPART) AS m1basepart,
RTRIM(M1SPONSOR) AS m1sponsor,
RTRIM(M1COMPAT) AS m1compat
FROM LGPGM.MARKTABLE