DMML is mostly architecture, not calculus. These are the operational formulas that make architecture answers precise: quality rates, freshness, lag, throughput, storage cost, availability, retries, sampling and ML-data checks. Use them to support design answers and scenario diagnostics.
Symbols
| Symbol | Meaning |
|---|---|
| \(N\) | total records/events/files in scope |
| \(N_{bad}\) | records failing quality checks |
| \(t_{event}\) | time event happened at source |
| \(t_{ingest}\) | time event entered pipeline/storage |
| \(t_{serve}\) | time event became available to consumers |
| \(R\) | record/event rate per second |
| \(S\) | average record/file size |
| \(C\) | capacity or cost, depending on formula context |
Data quality
Use for required fields, mandatory source feeds or partition arrival. Low completeness can make an ML model fail even when the pipeline technically ran.
Records pass schema/type/range/domain checks. Example: date format valid, country code in accepted list, amount not negative.
Important for ingestion, CDC and event processing. Duplicates inflate counts, leak repeated examples into training and break analytics.
Track per critical feature. A sudden null-rate spike is often a source schema or upstream deployment issue.
Converts a quality SLO into an operational threshold. Example: if budget is 0.1% over 10M records, allow at most 10,000 bad records before blocking/reviewing.
Freshness and lag
Delay from source event to pipeline entry. Use for logs, Kafka events, CDC and source API pulls.
Delay until consumers can query/use the data. Dashboards, feature stores and reverse ETL care about serving lag, not only ingestion lag.
How old the newest visible data is. Useful for "latest sales," operational analytics and online feature checks.
Only meaningful if processing rate is greater than arrival rate. If arrival rate exceeds processing rate, backlog grows without bound.
Throughput, latency and capacity
Core batch/stream metric. Pair with latency because high throughput can still hide slow individual events.
End-to-end time includes processing stages and queue waits. Message brokers improve reliability but can add queue delay under load.
First-order capacity sizing for ingestion/transformation. Add headroom for bursts, retries and maintenance.
How long it takes to clear a queue once processing catches up.
Storage and compression
Event rate times average size times seconds/day. Base calculation for object storage, lake partitions and streaming retention.
Remember replicas/copies. A "cheap lake" gets expensive if retention and replication are ignored.
Columnar data often compresses better because similar values sit together.
Cloud storage cost is not only bytes. Read/write requests and data egress can matter for pipeline-heavy workloads.
Reliability and availability
Used for data platforms, orchestrators, warehouses, feature stores and serving systems.
If every component must be up, total availability drops as dependencies increase.
If any replica can serve, redundancy raises availability.
Availability improves when failures are rarer (higher MTBF) or repair is faster (lower MTTR).
Useful for ingestion APIs and transient failures. Add jitter in real systems to avoid synchronized retry storms.
Sampling and validation
Sampling saves cost but can lose rare classes/events. Track what quality or minority-segment signal is lost.
Only valid for uniform/random sampling and stable distributions. Not safe for biased sampling.
Not a math-heavy formula, but the right operational question: who reads this field, and can older consumers survive it?
Decision tables
| Requirement | Prefer | Why |
|---|---|---|
| Many small current-state writes | OLTP/RDBMS | Transactions, constraints, consistency. |
| Wide analytical scans over few columns | Columnar warehouse/lakehouse | Column pruning, compression, aggregate performance. |
| Raw mixed-format low-cost storage | Data lake/object storage | Flexible schema-on-read and cheap retention. |
| Real-time events with replay | Kafka/Pulsar/Kinesis | Durable log, consumer decoupling, stream processing. |
| Historical correctness + realtime view | Lambda | Batch path for truth, speed path for latency. |
| One event-first processing path | Kappa | Less duplicate logic, replayable stream backbone. |
| Send model outputs back to CRM | Reverse ETL | Operational users work in their source tool. |
| Thousands of scheduled dependencies | Orchestrator | Retries, dependencies, backfills, observability. |
More in this vault
- Cheatsheet -- concepts and comparisons.
- Question Bank -- practice prompts.
- Slides Explained -- full plain-language walkthrough.