Dynamic — Reconcile, targeted reload, and where replay differs
Dynamic — Reconcile, targeted reload, and where replay differs
Diagram type: Dynamic (C4 supporting diagram) Scope: the daily reconciliation of one Salesforce object finding a discrepancy and scheduling a bounded reload through Bronze, Silver and Gold. Audience: data engineers; Finance and audit reviewers asking how completeness is proven. Structurizr view:
Dynamic-ReconcileAndReloadin structurizr/workspace.dsl Branches (tolerance, budget deferral) are in sequence-reload-and-reconcile.md.
Overview
Reconciliation compares source counts with Silver counts per source-modified-day. A delta above tolerance writes a reload request; the orchestrator picks it up when the API budget allows, re-extracts only that window (steps 5–7), the Bronze loader promotes it through the gate (step 8), and the normal Silver and Gold jobs absorb the new versions idempotently (steps 9–14). A replay (logic change) is the same flow without steps 2–8: Silver and Gold are rebuilt from Bronze with no source calls.
Diagram
C4Dynamic
title Dynamic diagram - Reconcile and targeted reload (Salesforce example)
Container(orch, "Orchestrator", "Fabric pipelines")
Container(recon, "Reconciler", "Fabric notebook")
System_Ext(sf, "Salesforce", "SOQL, REST, Bulk")
ContainerDb(silver, "lh_silver and control", "Fabric Lakehouse")
Container(cj, "Salesforce copy activity", "Fabric Data Factory")
ContainerDb(bronze, "lh_bronze", "Fabric Lakehouse")
Container(loader, "Bronze loader", "Fabric notebook; the gate")
Container(silverjobs, "Silver jobs", "Fabric notebooks")
Container(goldjob, "Gold jobs", "Fabric notebooks")
ContainerDb(gold, "lh_gold", "Fabric Lakehouse")
Rel(orch, recon, "Run reconciliation for the trailing 35 days", "notebook activity")
Rel(recon, sf, "Count records per SystemModstamp day", "SOQL COUNT over REST")
Rel(recon, silver, "Count Silver rows per day; write reconciliation_result; write reload_request where delta exceeds tolerance", "Delta")
Rel(orch, silver, "Pick reload_request by priority; check api_budget", "Delta")
Rel(orch, cj, "Run reload for (object, window) with mode=reload", "pipeline activity")
Rel(cj, sf, "Re-read the window", "REST")
Rel(cj, bronze, "Land the window as files", "Lakehouse Files")
Rel(orch, loader, "Promote through the gate; append new versions with mode=reload", "notebook activity")
Rel(orch, silverjobs, "Run Silver job for (object, window)", "notebook activity")
Rel(silverjobs, bronze, "Read new versions", "Delta")
Rel(silverjobs, silver, "MERGE by business key and source version (idempotent)", "Delta MERGE")
Rel(orch, goldjob, "Run the star build for touched partitions", "notebook activity")
Rel(goldjob, silver, "Read conformed rows", "Delta")
Rel(goldjob, gold, "Rebuild the touched dates; emit metrics.restated if a closed day moved", "Delta")
Rel(orch, silver, "Mark run landed; schedule a reconciliation re-check", "Delta")
Legend
- Numbered arrows in execution order.
- Steps 2–8 touch the source, the gate and the API budget; steps 9–15 are lake-internal and are the whole of a replay.
Elements
| Element | Type | Technology | Responsibility in this flow |
|---|---|---|---|
| Orchestrator | Container | Fabric pipelines | Schedules reconciliation; picks reload requests; runs jobs |
| Reconciler | Container | Fabric notebook | Counts, verdicts, reload requests |
| Salesforce | External system | SaaS | Answers counts and the re-read |
| lh_silver and control | ContainerDb | Fabric Lakehouse | Silver counts, reconciliation_result,
reload_request, ledger |
| Salesforce copy activity | Container | Fabric Data Factory | Bounded re-extraction, landed as files |
| Bronze loader | Container | Fabric notebook | Gate; appends new versions with mode=reload |
| lh_bronze | ContainerDb | Fabric Lakehouse | New tokenised versions appended |
| Silver jobs | Container | Fabric notebooks | Idempotent MERGE |
| Gold jobs | Container | Fabric notebooks | Day-level rebuild; restatement event |
| lh_gold | ContainerDb | Fabric Lakehouse | Rebuilt partitions |
Key relationships
See the numbered arrows; the same relationships exist at container level in 02-container.md.
Notable architectural decisions
- Reload is bounded to a window and always uses the polling path, even for sources with push (ADR 5).
- Reload requests are budget-aware so a large discrepancy cannot exhaust the daily API allocation (ADR 10).
- Restatements of closed days are published as
metrics.restatedbusiness events rather than silently overwritten (business architecture).
Assumptions
- The HubSpot and Google Ads variants are identical except that the reconciler calls the adapter's count operation instead of SOQL, and the reload runs the adapter instead of the copy activity.
- Tolerance per object is set by the data lead; initial value 0.1% of rows per day.
Links to other levels
- ↑ Level 2 — Containers
- See also: sequence with branches, control tables