Level 2 — Container view for Data Engineering — Marketing Data Platform
Level 2 — Container view for Data Engineering — Marketing Data Platform
Diagram type: Container (audience view) Scope: ingestion, lakehouse and control: everything Data Engineering and the support team operate. The operations console is drawn dashed because ADR 12 is Proposed. Audience: Data Engineering, the vendor's support team, developers. Structurizr view:
Containers-DataEngineeringin structurizr/workspace.dsl
Overview
Three adapters land files; the orchestrator drives them from the control schema; the Bronze loader promotes every file through the gate; Silver and Gold jobs build the layers; the reconciler compares the lake with the sources and raises reload requests; the state sync mirrors what the Functions keep in Table Storage into the control schema. Key Vault holds every credential; the session-enabled queue carries HubSpot nudges. The console, once accepted, reads all of it through read-only views and never writes.
Diagram
C4Container
title Container view for Data Engineering
Person(dataeng, "Data Engineering", "Operates ingestion; reloads and replays")
Person(support, "Support team (Proposed)", "On call under the support subscription")
System_Ext(sf, "Salesforce", "CRM of record")
System_Ext(hs, "HubSpot", "Marketing CRM; webhooks")
System_Ext(gads, "Google Ads", "Advertising; no push")
Container_Boundary(control, "Control and security") {
Container(orch, "Orchestrator", "Fabric Data Factory pipelines", "Tiers, registries, watermarks, run ledger, retries")
Container(kv, "Key Vault", "Azure Key Vault", "Credentials, webhook secrets, vault lookup key, CMK")
}
Container_Boundary(ingest, "Ingestion") {
Container(cj, "Salesforce copy activity", "Fabric copy activity", "Windows and bulk history as files")
Container(fn_hs, "HubSpot adapter", "Azure Functions, .NET 10 (runtime pending PoC)", "Keyset search, batch read, associations, receiver, nudge worker, counts")
Container(fn_gads, "Google Ads adapter", "Azure Functions, .NET 10 (runtime pending PoC)", "Snapshots, trailing windows, change_event, totals")
ContainerDb(state, "Adapter state store", "Azure Table Storage", "Cursors, receipts, breaker state, requests used")
ContainerQueue(sb, "Service Bus", "Azure Service Bus Standard", "Session-enabled ingest-nudges queue")
}
Container_Boundary(lake, "Lakehouse") {
Container(loader, "Bronze loader", "Fabric notebook", "The gate; only writer of Bronze")
ContainerDb(bronze, "lh_bronze", "Fabric Lakehouse", "Tokens only; landing files 7 days")
Container(nb_silver, "Silver jobs", "Fabric notebooks", "MERGE, SCD2, quality gates")
ContainerDb(silver, "lh_silver and control", "Fabric Lakehouse, CDF", "Typed state; control schema")
Container(sync, "State sync", "Fabric notebook", "Mirrors adapter state hourly")
Container(nb_gold, "Gold jobs", "Fabric notebooks", "Event job 15 min; star build hourly or nightly")
ContainerDb(gold, "lh_gold", "Fabric Lakehouse", "Star schema; business_event; restatement log (Proposed, ADR 12)")
Container(recon, "Reconciler", "Fabric notebook", "Source vs Silver counts; reload requests")
}
Container_Boundary(ops, "Operations (ADR 12, Proposed)") {
Container(console, "Operations console (Proposed)", "ASP.NET Core BFF and API, Vue 3, PostgreSQL; Container Apps", "Read-only cockpit: health with reasons, runs, queues, verdicts, incidents; deep links")
}
Rel(orch, cj, "Starts Salesforce runs on", "pipeline activity")
Rel(orch, fn_hs, "Invokes extract, history and count operations on", "HTTPS, JSON")
Rel(orch, fn_gads, "Invokes snapshot, report and change_event pulls on", "HTTPS, JSON")
Rel(cj, sf, "Reads changed records and bulk history from", "REST, Bulk API 2.0")
Rel(fn_hs, hs, "Reads objects by keyset inside windows from", "CRM v3 API")
Rel(hs, fn_hs, "Sends webhooks to", "HTTPS, signed JSON")
Rel(fn_hs, sb, "Enqueues nudged ids on", "AMQP")
Rel(sb, fn_hs, "Delivers nudge batches to", "AMQP, session lock")
Rel(fn_gads, gads, "Reads entities, reports and change events from", "REST searchStream")
Rel(cj, bronze, "Lands files in", "Lakehouse Files")
Rel(fn_hs, bronze, "Lands files in", "OneLake API")
Rel(fn_gads, bronze, "Lands files in", "OneLake API")
Rel(fn_hs, state, "Persists cursors, receipts, breaker state in", "managed identity")
Rel(fn_gads, state, "Persists cursors and requests used in", "managed identity")
Rel(fn_hs, kv, "Reads the private-app token and webhook secret from", "managed identity")
Rel(fn_gads, kv, "Reads the refresh token and client secret from", "managed identity")
Rel(orch, loader, "Runs after each landed window on", "notebook activity")
Rel(loader, bronze, "Reads landing files from; appends tokenised rows to", "Spark, Delta")
Rel(loader, kv, "Reads the vault lookup key from", "workspace identity")
Rel(loader, silver, "Reads the classification register from; writes quarantine references to", "Delta")
Rel(orch, silver, "Reads registries and watermarks from; writes the run ledger to", "lakehouse tables")
Rel(orch, sync, "Runs hourly", "notebook activity")
Rel(sync, state, "Reads adapter state from", "Table Storage REST")
Rel(sync, silver, "Upserts mirrored state and api_budget into", "Delta MERGE")
Rel(orch, nb_silver, "Runs Silver jobs for touched objects on", "notebook activity")
Rel(nb_silver, bronze, "Reads new raw versions from", "Spark, Delta")
Rel(nb_silver, silver, "Merges current state; appends history into", "Delta MERGE")
Rel(orch, nb_gold, "Runs the event job and the star build on", "notebook activity")
Rel(nb_gold, silver, "Reads conformed entities and the change feed from", "Spark, Delta")
Rel(nb_gold, gold, "Rebuilds partitions; inserts business events if absent in", "Spark, Delta")
Rel(orch, recon, "Runs daily counts and weekly hash reconciliation on", "notebook activity")
Rel(recon, fn_hs, "Requests source counts from", "HTTPS, JSON")
Rel(recon, fn_gads, "Requests daily totals from", "HTTPS, JSON")
Rel(recon, sf, "Counts records per day in", "SOQL over REST")
Rel(recon, silver, "Counts Silver rows; writes verdicts and reload requests to", "Delta")
Rel(dataeng, orch, "Triggers reloads and replays; monitors runs in", "Fabric portal")
Rel(dataeng, silver, "Reviews the ledger, verdicts and quarantine in", "SQL endpoint")
Rel(dataeng, console, "Triages incidents in", "HTTPS")
Rel(support, console, "Operates the platform through", "HTTPS, Entra guest")
Rel(console, silver, "Reads ops views over control through the SQL endpoint of", "TDS, read-only")
Rel(console, gold, "Reads restatement log and business events through the SQL endpoint of", "TDS, read-only")
Rel(console, state, "Reads cursors, receipts and breaker state from", "reader")
Rel(console, sb, "Reads queue counts and dead letters of", "ARM, reader")
Rel(console, kv, "Reads secret ages, never values, from", "reader")
Rel(console, orch, "Reads job instances for deep links into", "Fabric REST")
Legend
- Boundaries: the model's groups: Control and security, Ingestion, Lakehouse, Operations. Serving, Notification, Publication and Privacy are in the other audience views.
- Dashed (Structurizr) and "(Proposed)" in the label: elements that exist only in ADR 12, which is Proposed; nothing is built against them.
- ContainerDb (cylinder): data store. ContainerQueue (pipe): Service Bus.
- Abbreviations: CDF = Delta Change Data Feed; CMK = customer-managed key; SCD2 = slowly changing dimension type 2.
Elements
| Element | Type | Technology | Responsibility |
|---|---|---|---|
| Orchestrator | Container | Fabric Data Factory pipelines | Schedules per tier; fans out per object; writes the run ledger; retries; runs every other pipeline |
| Key Vault | Container | Azure Key Vault | Source credentials, webhook secrets, the vault lookup key, the customer-managed key |
| Salesforce copy activity | Container | Fabric Data Factory copy activity, Salesforce objects connector | Lands SystemModstamp windows and the Bulk API history
as files |
| HubSpot adapter | Container | Azure Functions, .NET 10 isolated (runtime pending PoC) | Keyset search inside windows; batch read; associations; webhook receiver; session-triggered nudge worker; counts (Level 3) |
| Google Ads adapter | Container | Azure Functions, .NET 10 isolated (runtime pending PoC, ADR 8) | Snapshots; trailing-window reports; change_event;
totals; one watermark per customer |
| Adapter state store | ContainerDb | Azure Table Storage | Cursors, receipts, breaker state, delivery logs, requests used;
mirrored hourly into control |
| Service Bus | ContainerQueue | Azure Service Bus Standard | Session-enabled ingest-nudges queue, one session per
portal, batched receive |
| Bronze loader | Container | Fabric notebook, Python and Spark | The gate (Level 3); the only writer of Bronze |
| lh_bronze | ContainerDb | Fabric Lakehouse, Delta | Tokens only; landing files with identifiers for at most 7 days |
| Silver jobs | Container | Fabric notebooks | Parse, conform, MERGE, SCD2, quality gates, quarantine |
| lh_silver and control | ContainerDb | Fabric Lakehouse, Delta, CDF | Typed state and history; control schema (registries, watermarks, ledger, cursors, verdicts, budgets, logs) |
| State sync | Container | Fabric notebook | Mirrors adapter state into control; rolls requests used
into api_budget |
| Gold jobs | Container | Fabric notebooks | Event job every 15 minutes; star build hourly or nightly; allow-list (Level 3) |
| lh_gold | ContainerDb | Fabric Lakehouse, Delta, V-Order | Star schema; business_event; restatement log (Proposed,
ADR 12); publications |
| Reconciler | Container | Fabric notebook | Source versus Silver counts; gated hash samples; reload requests |
| Operations console (Proposed) | Container | ASP.NET Core BFF and API, Vue 3, PostgreSQL with pgvector; Azure Container Apps | Read-only cockpit with deep links; incidents opened by alerts and people (design) |
Key relationships
| From | To | Intent | Protocol / Technology |
|---|---|---|---|
| Orchestrator | Copy activity, adapters, notebooks | Starts runs with (object, window, mode); async request-reply for runs over about 3 minutes | Pipeline activities; HTTPS JSON |
| Adapters | State store, Key Vault | Cursors and breaker state; credentials | Table Storage REST; Key Vault REST, managed identity |
| Bronze loader | lh_bronze, lh_silver | Promotes through the gate; reads the register; writes quarantine references | Spark, Delta |
| Reconciler | Adapters, Salesforce, lh_silver | Counts both sides; writes verdicts and reload requests | HTTPS JSON; SOQL; Delta |
| Console (Proposed) | Control schema, Gold, state store, Service Bus, Key Vault, orchestrator | Reads only, through an ops view schema and reader
roles |
TDS, ARM, REST |
Notable architectural decisions
- Keyset paging on
hs_object_idinside the window replaces offset paging (ADR 3, WP0b finding C2). - Static request-budget shares per caller with one in-flight consumer per share; the queue's session lock is the guarantee (ADR 8).
- A
run_idfixes its windows and split plan; a rerun reads them from the ledger (ADR 5). - The console reads
opsviews only and holds no copy of platform data (ADR 12, Proposed).
Assumptions
- The extractor runtime is decided by the WP0b PoCs; the nudge worker and receiver stay on Functions in either case.
- The console's read scope is granted per view through the SQL analytics endpoint, with no workspace role.