Medallion Data Flow
Medallion Data Flow
Solid arrows are the polling paths (completeness). Dotted arrows are push accelerators and reconciliation counts.
flowchart LR
subgraph Sources
SF[Salesforce]
HS[HubSpot]
GA[Google Ads]
end
subgraph Extract["Extract: poll guarantees, push accelerates"]
CJ["Copy activity<br/>SystemModstamp, 15 min"]
CDC["CDC consumer<br/>phase 2"]
HSA["HubSpot adapter<br/>search + batch read"]
WH["Webhook receiver<br/>nudges"]
GAA["Google Ads adapter<br/>trailing windows"]
end
subgraph Restricted["Restricted workspace"]
L["Landing files<br/>place 1: identifiers, 7 days"]
GATE{{"Anonymisation gate<br/>in the Bronze loader"}}
B[("Bronze<br/>tokens only, append-only, provenance")]
S[("Silver<br/>MERGE, SCD2, typed")]
C[("Control<br/>ledger, watermarks, recon")]
end
V[("Token vault<br/>Azure SQL, CMK, PIM<br/>the only place erasure must succeed")]
subgraph Analytics["Analytics workspace"]
G[("Gold<br/>star schema, tokens")]
BE[("business_event<br/>CDF on")]
SM["Semantic models<br/>Direct Lake"]
RG["Report generator<br/>versioned definitions, pinned Gold versions"]
end
subgraph Out["Downstream"]
RL[Relay] --> SB[["Service Bus topic"]]
SB --> WD[Webhook dispatcher]
SB --> SSE["Push gateway (SSE)"]
SB --> ACT[Activator to Teams]
RG --> AP["Sign-off"] --> DL["Delivery adapter<br/>contracted channel"]
end
SF --> CJ --> L
SF -.-> CDC -.-> L
HS --> HSA --> L
HS -.-> WH -.-> HSA
GA --> GAA --> L
L --> GATE --> B
GATE <--> V
B --> S
S --> G
S --> BE
G --> SM
G --> RG
BE --> RL
S <--> C
RC[Reconciler] --> C
RC -. counts .-> SF
RC -. counts .-> HS
RC -. counts .-> GA
Layer transitions
| Transition | Job | Idempotency mechanism | Gate |
|---|---|---|---|
| Landing files → Bronze | Bronze loader (anonymisation gate) | Dedupe on (source, object, record id, source version, payload hash after tokenisation) | Manifest row count matches; every column classified; PII scan clean; identifiers replaced by vault tokens |
| Bronze → Silver | Silver job per object family | MERGE by business key keeping the highest source version; SCD2 close/open by version | Keys, uniqueness, freshness, delta |
| Silver → Gold | Gold jobs (Tier 1 event job every 15 minutes; star build hourly or nightly) | Facts rebuilt per date with replaceWhere;
business_event inserted if absent on a deterministic
event_id |
Referential integrity; allow-list (hard fail) |
| Gold → consumers | Relay, semantic models | Deterministic event id; Direct Lake framing | Fallback check |