Control Tables (schema `control` in `lh_silver`)
Control Tables
(schema control in lh_silver)
Mutable document. These tables are the operational memory of the platform: what to extract, where each extraction stands, what was verified, what must be reloaded. ADR 5 defines the semantics.
Two physical homes. Tables marked (adapter state)
are written by the Azure Functions into Azure Table Storage in the
Function App's storage account, because a Function cannot write Delta
tables in a lakehouse; the hourly state-sync notebook mirrors them into
control for the dashboard and the budget check. Every other
table is written directly in Delta by pipelines and notebooks. If the
WP0b PoC selects the notebook runtime, the control tables the extractor
writes are created with delta.enableDeletionVectors = false
and have one writer engine each, because delta-rs cannot write deletion
vectors, which Fabric Spark Runtime 2.0 enables by default (finding C4);
a periodic OPTIMIZE job compacts their small files.
| Table | Purpose | Key columns |
|---|---|---|
source_registry |
One row per source system | source, adapter (copy_activity,
function:auth_ref (Key
Vault name), time_zone, daily_request_budget,
reserve_pct, active, portal_id,
subscription_tier, webhook_secret_ref,
base_url, api_version; for Google Ads
login_customer_id, customers[] (id and
customer.time_zone, read at enumeration, finding C26),
client_id_ref, client_secret_ref,
developer_token_ref (WP0b finding C8) |
object_registry |
One row per source object or report | source, object, tier (1–4),
schedule_cron, mode (incremental, snapshot,
trailing_window), window_size_minutes,
trailing_days, business_key[],
version_column, delete_detection
(is_deleted_sweep, archived_sweep, snapshot_diff, cdc),
max_rows_per_window (10,000 for HubSpot search),
silver_table, mapping_ref (the Silver mapping
routine for this object: a notebook or a package module),
contract_version (the domain
model version the mapping targets), scd_type,
active, safety_lag_minutes,
min_window_seconds, initial_watermark,
page_size, paging_mode (keyset, offset),
properties[], associations[],
query (GAQL template), max_windows_per_run,
historical_threshold_days (finding C18),
webhook_object_type (the subscriptionType and
objectTypeId values that map to this object, finding
C24) |
rate_share |
Request-budget share per caller | source, subscription_tier,
caller (extractor, nudge_worker, reconciler, historical),
bucket (general, search, associations),
share_per_window (ADR 8) |
watermark |
Last fully landed position per object, and per partition where a source has several accounts | source, object, partition
(optional; customer_id for Google Ads, so one customer
cannot hold back the others, finding C34), watermark_value,
watermark_type (timestamp, date, version),
updated_at, updated_by_run |
ingestion_run |
The run ledger | run_id, source, object,
window_key, window_start,
window_end, partition (optional;
customer_id for Google Ads, finding C34), mode
(incremental, historical, snapshot, trailing_window, reload, replay,
reconcile; finding C31), triggered_by (schedule, nudge,
reload_request, operator), started_at,
ended_at, status (running, landed, partial,
failed, cancelled; one row per (run_id, object, partition);
the run-level status is landed when every partition landed,
partial when some landed and others failed with their
watermarks moved independently, failed when none landed,
running otherwise; finding C35), pages_done,
rows_read, rows_written,
requests_used, error_class,
error_message, parent_run_id,
windows (JSON: the windows and split plan fixed at first
start, reused by a rerun of the same run_id, finding
C23) |
page_cursor |
(adapter state) Resume point inside a running window, committed by the adapter after each landed page | run_id, window_key, partition
(optional, finding C34), object (the run's own object or a
dependent one such as its associations, finding C31),
page_no, cursor_type (after, after_id,
replay_id, page_token, segments_date, window, snapshot),
cursor_value, done, committed_at
(finding C16) |
breaker_state |
(adapter state) Circuit-breaker state per caller, persisted across requests and runs so the next scheduled run starts half-open | source, caller, state
(closed, open, half_open), open_reason (throttle,
server_errors, daily_limit), recent_429_at[] (timestamps
within the last minute, so a rolling minute survives a restart),
failures_in_window (derived), opened_at,
until, last_probe_at (findings C13, C30) |
api_budget |
Daily request accounting per source | source, date, requests_used,
requests_limit, last_checked_at,
source_reported_remaining |
reconciliation_result |
Evidence of completeness | recon_id, source, object,
period (source-modified-day), source_count,
lake_count, delta, tolerance,
hash_sample_size, hash_mismatches,
verdict (ok, reload_scheduled, investigate),
reload_run_id, checked_at |
reload_request |
Queue of bounded reloads | request_id, source, object,
window_start, window_end, reason
(restatement, recon, incident, operator), requested_by,
requested_at, status, run_id |
quarantine |
Rows that failed a quality gate | run_id, layer, table,
check_name, row_key,
landing_file, row_number,
column_name (references only, never the payload, ADR
6), quarantined_at, resolved_at,
resolution |
outbox_cursor |
Last Change Data Feed version published per table | table, last_published_version,
published_at, events_published |
webhook_subscriber |
(adapter state) Registered downstream endpoints, read by the dispatcher | subscriber_id, name, url,
secret_ref, event_filter, active,
created_at, last_success_at,
failures_in_row |
delivery_log |
(adapter state) Outbound deliveries (webhook, SSE, Teams) | event_id, subscriber_id,
attempt, status_code,
attempted_at, next_attempt_at,
dead_lettered |
nudge_log |
(adapter state) Inbound HubSpot webhook receipts | received_at, subscription_type,
object_type, object_id, property,
signature_valid, processed_run_id |
requests_used |
(adapter state) Requests consumed per source per
run, reported by the adapters and rolled into api_budget by
the state sync |
source, run_id, requests,
recorded_at |
erasure_log |
Summary of each erasure run; the authoritative evidence record is appended to immutable storage (Azure Blob, time-based retention, hash chain) | request_id, subject_hash (SHA-256 of the
normalised identifier, computed at request time),
requested_at, executed_at,
vault_rows_deleted, landing_files_rewritten,
log_purge_done, gold_rows_deleted (only if the
DPO requires), stores_verified[], executed_by,
dpo_signoff, evidence_blob_uri |
schema_drift |
Columns seen in Bronze not in the Silver contract | source, object, column,
first_seen_run, sample_value_hash,
status (new, classified, ignored) |
report_definition |
Registry of report definitions as deployed (the definitions themselves live in Git) | report, definition_version,
owner, approver, audience,
grain, gold_tables[], format,
cadence_cron, recipients[],
channel, closed_period_freeze,
active |
publication_log |
One row per generated publication; append-only (ADR 11) | publication_id, report,
definition_version, period,
revision, supersedes_publication_id,
gold_versions (table → Delta version),
generator_version, generated_at,
file_uri, file_hash, status
(generated, approved, rejected, delivered, superseded, held),
approver, approved_at,
approval_comment, change_summary (for
revisions), delivered_at, channel,
delivery_evidence_ref |
Rules
- Delta has no multi-table transactions, so the ledger row is written
first with status
landedand the watermark second. A failure between the two leaves a landed run with an old watermark; the next run re-executes that window, which is safe because every run is idempotent. The ledger row, not the watermark, is the evidence that a window landed. api_budgetis checked before every run; ifrequests_used + estimated > limit × (1 − reserve_pct), the run defers and raises a warning.window_keytimestamps are UTCyyyy-MM-ddTHH:mm:ss.fffZand the interval is half-open (finding C21). In the notebook variant the extractor writescontrolthrough anabfss://path with a storage token, because its default lakehouse is the landing lakehouse (finding C15).reload_requestrows are picked up by the orchestrator in priority order (incident > recon > restatement > operator) and spread across days when the budget is tight.- An operations dashboard (Power BI over this schema) shows freshness per tier, open reloads, reconciliation verdicts, budget consumption and delivery failures.