milestone 10/12 Stage, validate & atomically promote a refresh
Validate staged data before replacing a published result.
CRM + ERP Integration · Follow extraction reconciliation, authoritative integration, date quarantine, quality gates, stable keys, replay-safe loads, and atomic promotion. Finish with a customer-grain capstone and field-level lineage.
approach
Build and validate the candidate before replacing published data. A transaction makes related writes commit together; rollback retains the old snapshot. In this controlled lab the candidate is known to pass. Production needs explicit blocking gates, failure handling, and workload-specific isolation. SQL Server TRUNCATE syntax is not executed here.
BEGIN; DELETE FROM published_totals; INSERT INTO published_totals SELECT * FROM refresh_stage; ROLLBACK; SELECT customer_id,total_sales FROM published_totals;
data for this milestone
published_totals2 columns · 2 rows
| customer_idtext · key | total_salesreal |
|---|---|
| C001 | 289 |
| C002 | 116 |
all 2 rows
refresh_stage2 columns · 2 rows
| customer_idtext | total_salesreal |
|---|---|
| C001 | 300 |
| C002 | 120 |
all 2 rows