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

36 lines
1.3 KiB
SQL

SELECT
RTRIM([Entity]) AS entity,
RTRIM([Company]) AS company,
RTRIM([Company Name]) AS company_name,
RTRIM([Account#]) AS "account#",
RTRIM([AZTITL CHG Description]) AS aztitl__chg_description,
RTRIM([FGRP]) AS fgrp,
RTRIM([Department]) AS department,
RTRIM([Department Name]) AS department_name,
RTRIM([STMT]) AS stmt,
RTRIM([LVL0]) AS lvl0,
RTRIM([LVL1]) AS lvl1,
RTRIM([LVL2]) AS lvl2,
RTRIM([LVL3]) AS lvl3,
RTRIM([Summary Acct]) AS summary_acct,
RTRIM([CF Mapping]) AS cf_mapping,
RTRIM([FS]) AS fs,
RTRIM([Level 1]) AS level_1,
RTRIM([Level 2]) AS level_2,
RTRIM([Level 3]) AS level_3,
RTRIM([Level 4]) AS level_4,
RTRIM([D&A]) AS d_a,
RTRIM([Addback]) AS addback,
RTRIM([Anaplan Mapping]) AS anaplan_mapping,
RTRIM([Anaplan D&A PE Exp.]) AS "anaplan_d_a__pe_exp.",
RTRIM([Mapping.Completion.Check]) AS "mapping.completion.check",
RTRIM([FS (Audit format)]) AS fs__audit_format_,
RTRIM([Level 1 (Audit format)]) AS level_1__audit_format_,
RTRIM([Level 2 (BS)]) AS level_2__bs_,
RTRIM([IS Mapping (Audit)]) AS is_mapping__audit_,
RTRIM([Manual Adjustment to Shua File]) AS manual_adjustment_to_shua_file,
RTRIM([Difference in Mapping]) AS difference_in_mapping,
RTRIM([EBITDA]) AS ebitda,
RTRIM([ELIM]) AS elim
FROM [FANALYSIS].[GS].[coa_map]