pipekit/config/modules/ggtp.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

18 lines
577 B
SQL

SELECT
RTRIM(D35GCDE) AS d35gcde,
RTRIM(D35DES1) AS d35des1,
RTRIM(D35DES2) AS d35des2,
RTRIM(D35DES3) AS d35des3,
RTRIM(D35USR1) AS d35usr1,
RTRIM(D35USR2) AS d35usr2,
RTRIM(D35USR3) AS d35usr3,
D35USR4 AS d35usr4,
D35USR5 AS d35usr5,
RTRIM(D35CUSR) AS d35cusr,
CASE WHEN D35CDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE D35CDAT END AS d35cdat,
D35CTME AS d35ctme,
RTRIM(D35UUSR) AS d35uusr,
CASE WHEN D35UDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE D35UDAT END AS d35udat,
D35UTME AS d35utme
FROM LGDAT.GGTP