feat(phase3): dimension harmonization (crosswalk layer)
Open-source Excel-native EPM and consolidation for SAP & Dynamics
Brought to you by:
konsolid-at
Originally created by: pyy3
Phase 3 (Multi-ERP), per docs/prd/PRD-DIMENSION-HARMONIZATION.md. Harmonizes raw, ERP-local dimension values to canonical values across connectors so the same economic dimension consolidates across legal entities on different erp_source.
⚠️ Stacked on [#37] (ERPNext connector). Review/merge [#37] first; the diff here includes [#37]'s commits until then.
dim_harmonize_select / dim_harmonize_joins macros — applied centrally in canonical stg_gl_entries / stg_budget_entries (keyed on the per-row erp_source), so every adapter is covered without restating columns. This is a deliberate, lighter-touch deviation from the PRD's per-adapter wiring — one place vs. editing every adapter, and it satisfies AC [#2] (harmonized values appear in stg_gl_entries).coalesce — ClickHouse LEFT JOIN fills unmatched rows with '', not NULL).seeds/dimension_mappings.csv (+ _seeds.yml) keyed on (dimension, erp_source, source_value) -> canonical_value.gold_unmapped_dimension_values — the "needs harmonization" review queue: distinct source values in GL with no published mapping.test_dimension_mappings_unique — uniqueness of published crosswalk keys.record_id to UInt64 (also in [#37]) so it UNIONs with the D365 budget adapter.erp_sources: [d365_fo, erpnext])001 and ERPNext Main - AC both harmonize to CC-CORP (consolidation across ERPs). ✅Other - AC passes through unchanged. ✅gold_unmapped_dimension_values lists exactly the unmapped values. ✅test_erp_source_valid + test_dimension_mappings_unique pass (25 nodes). ✅Dimension Mapping Frappe doctype + publish→seed regeneration (konsol side) — tracked separately.🤖 Generated with Claude Code
Ticket changed by: grynn-in