ec499ca5f5701d4d1d8dd6301d76d6701d2ae2d1
migration/transform_customers.py builds `customers` + `customer_legacy_refs` from staged DATGRAL, implementing the reconciliation rules: utilities DATGRAL is the customer master; insurance DATGRAL folds in via its num_util cross-reference (matches enrich the master with the ID-document fields utilities lacks); COBRO3 excluded as a charge batch. Every legacy row gets a provenance ref, so the load is auditable and idempotent (truncate+rebuild). Loaded and validated against the dev DB (192.168.4.212:3307): 1682 customers (1172 utilities master + 510 insurance-only) 2242 legacy refs (1172 utilities + 1070 insurance) — 0 orphans 560 insurance rows linked via num_util, 0 broken cross-refs 542 merged identities spanning both business lines Spot-checked a merged customer: single record carrying utilities fee + insurance passport/ID enriched in, both provenance refs present. RESUME.md: mark customers done, record dev-DB infra + the pnpm/npm caveat. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Description
No description provided
2.2 MiB
Languages
TypeScript
82.3%
Python
10.1%
CSS
3.7%
JavaScript
3%
Shell
0.5%
Other
0.4%