runtime
CRM + ERP Integration · milestone 01 / 12

milestone 1/12 Reconcile extraction & Bronze ingestion

Reconcile source counts with ingested records.

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

Bronze preserves raw values. Compare a supplied extraction manifest to landed counts before cleaning; a matching count alone cannot prove correct column alignment. A discrepancy is evidence to investigate, not permission to delete data.

worked-example.sql
WITH landed AS(
  SELECT 'CRM' AS source_name,COUNT(*) AS landed_rows
  FROM crm_people
  UNION ALL
  SELECT 'ERP',COUNT(*)
  FROM erp_people
)
SELECT
  m.source_name,
  m.expected_rows,
  l.landed_rows,
  l.landed_rows-m.expected_rows AS difference
FROM load_manifest m
JOIN landed l USING(source_name);

data for this milestone

crm_people5 columns · 6 rows
source_rowinteger · keycustomer_idtextnametextgendertextupdated_attext
1 C001 AliceF2025-01-01
2C001Alice NguyenF2025-01-05
3C002Benn/a2025-01-02
4C003CaraF2025-01-03
5C004DevNULL2025-01-04

showing 5 of 6 rows

erp_people3 columns · 5 rows
erp_idtextgendertextbirth_datetext
NASC001Male1990-05-12
NASC002Male1988-02-29
NASC003Female2028-01-01
NASC004Other1995-06-20
NASC999Female1980-01-01

all 5 rows

load_manifest2 columns · 2 rows
source_nametext · keyexpected_rowsinteger
CRM6
ERP5

all 2 rows

challenge 1

Return source_name,expected_rows,landed_rows,difference (landed minus expected) for CRM and ERP using load_manifest and the raw tables.

Return source_nameexpected_rowslanded_rowsdifferenceany row order

challenge-1.sql
 
3 steps left · check both queries and pass the concept checkNext milestone
Reconcile extraction & Bronze ingestion — CRM + ERP Integration · Runtime