Machine Learning pathway increased my salary by 40%
Data Platform Cost Engineering
Bring data platform spend under deliberate control: attribute cost to owners at workload creation, eliminate the predictable sources of waste, right-size compute without harming service levels, and report cost in the unit economics the business actually understands.
Executive Summary
Data platforms have a cost structure unlike most IT systems: storage is cheap and accumulates silently, compute is expensive and bursty, and every query is a spending decision made by someone who does not see the bill. This produces the familiar pattern of a platform whose cost doubles year over year while nobody can explain which team or workload caused it. Cost engineering is the discipline that fixes this. It starts with attribution, because cost that cannot be allocated cannot be managed. It continues with eliminating the predictable sources of waste: full table scans on unpartitioned data, idle warehouses, duplicate pipelines producing the same table, unbounded snapshot retention and uncollected small files. It finishes with unit economics, expressing cost per order, per active user or per model inference, so that spending decisions are made against business value rather than against last month total.
Definition
Data platform cost engineering is the practice of measuring, attributing, optimising and governing the cost of storage, compute, ingestion and serving in a data platform. It borrows from FinOps but specialises for data workloads, where the dominant costs are query compute, storage accumulation and always-on clusters. It requires tagging at workload creation, so that every job and query carries an owner; visibility at the level of a team, dataset and query; optimisation of the specific waste patterns that dominate data estates; and governance in the form of budgets, quotas and reviews. The output is not merely a lower bill but a predictable one, where the relationship between usage and cost is understood and where each consumer can see the consequence of their own decisions.
Why It Matters
Cost is the constraint that most often determines what a platform can do. A platform whose spend is unpredictable cannot be planned around, so new workloads are delayed or refused. A platform with no attribution cannot charge back, so consumption is free at the point of use and grows accordingly. A platform with no optimisation discipline funds waste rather than capability, and waste in data estates is substantial and structural rather than incidental: repeated full scans, idle clusters, duplicated pipelines and retained snapshots together frequently account for a third or more of spend. Cost engineering also protects the platform politically. When finance asks why analytics costs what it does, an answer in unit economics is credible while an answer in total spend is not.
Evolution of the Technology
Reactive Cost Cutting -> Visibility and Tagging -> Attribution and Chargeback -> Unit Economics -> Continuous Optimisation. Early cost management was reactive: a bill arrives, a project is paused. Tagging introduced visibility but rarely reached full coverage because it was applied after workloads were created. Attribution and chargeback created accountability and changed behaviour immediately. Unit economics connected spend to business value and enabled trade-off conversations. The current state is continuous optimisation, where cost signals are part of the platform itself and teams see the cost of their queries and pipelines as they build rather than months later.
Learning Objectives
- Tag workloads at creation so cost is attributable by default
- Build a cost model that maps spend to teams, datasets and queries
- Identify and quantify the dominant waste patterns in a data estate
- Right-size compute without breaching service levels
- Apply storage tiering and retention policy deliberately
- Design a chargeback or showback model that changes behaviour
- Express cost in unit economics the business understands
- Set budgets and quotas that prevent surprise invoices
- Reduce query cost through partitioning and layout discipline
- Run a monthly cost review that produces decisions, not reports
Prerequisites
- Familiarity with cloud pricing for storage and compute
- Understanding of query engines and warehouse concepts
- Basic knowledge of partitioning and file layout
- Access to billing or cost management data for your platform
Attribution: The Prerequisite for Everything
Cost that cannot be attributed cannot be managed. Attribution requires that every workload carries an owner and a purpose at the moment it is created, not in a spreadsheet maintained afterwards. In practice this means tagging at provisioning: a warehouse cluster, a pipeline, a notebook session and a scheduled query all carry a team, a cost centre and ideally a product. The two failure modes are well known. Retrospective tagging covers only what someone remembered to tag, and typically misses the largest and newest workloads. Untagged spend then accumulates in an unallocated pool that grows until the model is abandoned. The solution is a gate: provisioning fails without tags, and untagged spend is treated as an incident rather than a rounding error. With attribution in place, every subsequent optimisation has a beneficiary and an owner, which is what converts a cost report into a decision.
Attribution Requirements
| Requirement | Mechanism | Failure if Absent |
|---|---|---|
| Owner tag | Required at provisioning | Unallocated spend grows |
| Cost centre | Inherited from team | Finance cannot book it |
| Workload class | Batch, interactive, ML | Cannot prioritise optimisation |
| Environment | Production, staging, sandbox | Sandboxes hidden in production cost |
| Dataset linkage | Table to owning team | Cannot price a data product |
The Dominant Waste Patterns
Data estate waste is structural and repetitive. Full table scans on unpartitioned or poorly clustered tables dominate query cost in most platforms, and they are usually fixable with layout changes rather than engine tuning. Idle compute is the second largest: warehouses left running outside business hours, clusters sized for peak load and left at peak all day, and always-on endpoints serving occasional queries. Duplicated pipelines are the third: two teams computing the same metric from the same source into two tables, each paying for the computation. Retention is the fourth: snapshots, raw zones and staging areas retained indefinitely because nobody defined a policy. Small files are the fifth: uncompacted tables that multiply read cost. Quantifying each pattern before fixing it matters, because it determines where effort returns the most, and the answer is frequently layout and scheduling rather than a cheaper instance type.
Waste Patterns and Controls
| Pattern | Typical Cause | Control |
|---|---|---|
| Full scans | No partitioning or clustering | Partition design and clustering |
| Idle compute | Always-on clusters | Auto-suspend and scheduling |
| Duplicated pipelines | No shared data products | Conformed models and ownership |
| Unbounded retention | No retention policy | Snapshot expiry and lifecycle rules |
| Small files | Frequent commits without compaction | Scheduled compaction |
| Oversized clusters | Sized for peak, never revisited | Right-sizing reviews |
Right-Sizing Without Harming Service Levels
Right-sizing is often approached as an infrastructure exercise, and it fails when it ignores service levels. Reducing a cluster size may save money and breach a reporting deadline, which is a worse outcome than the spend. The correct sequence is to define the service level first, measure the headroom the workload actually needs to meet it, and then size to that rather than to peak observed load. Practical levers include auto-suspend for interactive warehouses, separate clusters per workload class so a batch job cannot force interactive capacity upward, query timeouts to prevent runaway scans, concurrency limits to stop one consumer monopolising capacity, and reserved capacity only where usage is genuinely predictable. Each lever has a cost in flexibility, and the review should state which was chosen and why. Revisiting sizing on a schedule matters because workloads drift; a cluster sized correctly a year ago is frequently oversized or undersized today.
Right-Sizing Levers
| Lever | Saving | Trade-off |
|---|---|---|
| Auto-suspend | High for interactive | Cold start latency |
| Workload separation | Prevents over-provisioning | More clusters to manage |
| Query timeout | Stops runaway scans | Legitimate long queries fail |
| Concurrency limits | Protects service levels | Queueing under load |
| Reserved capacity | Predictable discount | Committed spend |
Unit Economics and Behaviour Change
Total spend is a number nobody can act on. Unit economics makes cost legible: cost per order processed, per active user, per thousand model inferences, per report delivered. Once expressed this way, two things happen. First, cost becomes comparable with value, so a conversation about whether a workload is worth running becomes possible. Second, anomalies become visible, because a cost per order that triples is a signal while a total that rises with volume is not. Unit economics also changes behaviour more effectively than any policy, because teams can see the cost of their own design choices in a metric they understand. The supporting practice is a regular review that produces decisions rather than a report: which workload to optimise, which to retire, which to fund, and which service level to renegotiate. Reviews without decisions become theatre and are abandoned within two quarters.
Unit Economics Examples
| Business | Unit | Reveals |
|---|---|---|
| Retail | Cost per order | Efficiency of order pipelines |
| Banking | Cost per transaction analysed | Value of enrichment workloads |
| SaaS | Cost per active user per month | Platform efficiency against revenue |
| Manufacturing | Cost per sensor-day | Telemetry retention economics |
| AI platform | Cost per thousand inferences | Model and routing efficiency |
From Bill to Actionable Decision
Turning a monthly invoice into owned optimisations
Query Cost Reduction Cycle
Reducing the largest query cost driver
Showback, Chargeback and the Politics of Allocation
Showback reports cost to a team; chargeback transfers it to their budget. Showback changes awareness; chargeback changes behaviour, because it competes with other spending. Choosing between them is a governance decision rather than a technical one, and it should be made explicitly. Chargeback requires an allocation rule for shared components such as catalogue, orchestration and platform engineering time, and every rule is contestable. The most durable approach is to allocate shared cost proportional to direct consumption, publish the rule, and allow review rather than negotiation. Practical problems arise from retroactive allocation, where a team is charged for spend they did not control, and from allocation that hides the biggest cost in a small line item. Publishing cost at the workload level, not only at the team level, avoids both: teams see exactly which of their pipelines is expensive, which is the information they need to change it.
Showback vs Chargeback
| Aspect | Showback | Chargeback |
|---|---|---|
| Effect | Awareness | Behaviour change |
| Budget impact | None | Competes with other spend |
| Allocation rules | Simpler | Contested, requires governance |
| Best when | Starting out | Cost maturity established |
| Risk | Ignored reports | Disputes and shadow platforms |
Storage Economics and Retention Policy
Storage is cheap per gigabyte and expensive in aggregate, and the accumulation is usually invisible because no single decision looks costly. A platform that retains raw data, staging areas, intermediate tables, snapshots and backups indefinitely will see storage grow linearly with time regardless of usage. Retention policy is therefore the primary control, and it must be set per data class rather than globally. Raw zone data may be retained for reprocessing, typically weeks to months. Snapshots for time travel are retained to meet audit needs, not indefinitely. Staging and intermediate areas should expire automatically within days. Backups follow regulatory requirements. Tiering adds a second control: data accessed rarely can move to cheaper storage classes, provided retrieval cost and latency are acceptable for the workload. Both controls require ownership, because a retention policy without an owner decays into a default of keeping everything.
Retention by Data Class
| Data Class | Typical Retention | Rationale |
|---|---|---|
| Raw zone | Weeks to months | Reprocessing window |
| Staging and intermediate | Days | Transient by definition |
| Snapshots for time travel | Aligned to audit need | Compliance, not convenience |
| Curated tables | Business requirement | Reporting and analysis |
| Backups | Regulatory minimum | Recovery and compliance |
Frameworks & Standards
Cost frameworks provide the structure that turns spend data into an operating discipline.
Cost Engineering Frameworks
| Framework | Focus | Use |
|---|---|---|
| FinOps lifecycle | Inform, optimise, operate | Programme structure |
| Tag-at-creation gate | Attribution by default | Provisioning control |
| Unit economics | Cost per business unit | Value comparison and anomaly detection |
| Retention by data class | Storage discipline | Accumulation control |
| Monthly decision review | Actions with owners | Sustained improvement |
Tools & Technologies
| Category | Tools | Use Case |
|---|---|---|
| Cloud cost data | AWS Cost Explorer and CUR, Azure Cost Management, GCP Billing export | Raw spend per workload |
| Warehouse cost | Snowflake resource monitors, BigQuery information schema, Databricks system tables | Query and cluster level cost |
| Attribution | Tag policies, cost allocation tags, custom mapping tables | Owner and cost centre allocation |
| Dashboards | Looker, Power BI, Grafana, custom FinOps dashboards | Visibility per team and workload |
| Budgets and quotas | Cloud budgets, warehouse resource monitors, platform quotas | Preventing surprise invoices |
| Optimisation | Query profiling, partition analysis, compaction tooling | Reducing scanned bytes and idle time |
| Orchestration insight | Airflow and Dagster metrics, dbt run results | Cost per pipeline run |
| FinOps platforms | Cloudability, CloudHealth, native FinOps hubs | Cross-cloud allocation and reporting |
Cost Control Approaches
| Approach | Effectiveness | Effort | Risk |
|---|---|---|---|
| Reactive cutting | Low | Low | Breaks service levels |
| Tagging and visibility | Moderate | Moderate | Ignored without ownership |
| Chargeback | High | High | Disputes |
| Unit economics | High | Moderate | Requires business metric definition |
| Design-level optimisation | Highest | High | Requires engineering change |
Enterprise Use Cases
Case Studies
Problem: Platform spend doubled in eighteen months. Finance could not attribute more than sixty percent of it, and engineering could not explain the increase beyond a general sense that usage had grown.
Architecture: Enforced tags at provisioning so every workload carried an owner and class, allocated shared cost proportionally, quantified waste by pattern, and prioritised partitioning, auto-suspend and snapshot expiry based on measured impact.
Outcome: Attribution reached ninety-eight percent, waste reduction delivered a meaningful reduction in run rate within two quarters, and the following budget cycle was set against unit economics rather than a percentage increase.
Lessons: The largest single saving came from attribution itself, because teams changed behaviour as soon as they could see their own cost.
Problem: Two thirds of warehouse compute came from a handful of dashboards querying one large unpartitioned table, each query scanning the full history.
Architecture: Repartitioned by event date with clustering on the most common filter column, compacted small files, and added a summary table for the dashboards that only needed monthly aggregates.
Outcome: Scanned bytes per dashboard load fell by more than ninety percent, with no change to the dashboards themselves.
Lessons: Most query cost is a layout problem, not an engine problem, and layout fixes are invisible to consumers.
Implementation Steps
Enterprise SOPs
Purpose: Ensure every workload is attributable from creation
Owner: Platform Engineering
Steps: Validate tags on request, reject provisioning without owner and class, provision with inherited cost centre, verify tags appear in billing, reconcile weekly, escalate untagged spend
Evidence: Provisioning records, billing tag coverage report, escalation log
Purpose: Turn cost data into decisions
Owner: Head of Data Platform with Finance
Steps: Review attributed spend and unit economics, identify anomalies and top workloads, agree actions with owners, set deadlines, track realised savings, feed into budget
Evidence: Review minutes, action register, savings tracking
Purpose: Control storage accumulation
Owner: Data Governance with Platform
Steps: Review retention per data class, confirm audit obligations, configure expiry and lifecycle rules, verify deletion occurs, document justification, review quarterly
Evidence: Retention policy, configuration, deletion verification, justification record
Reduce Platform Spend While Preserving Service Levels
Problem: A platform serving four business units has grown spend steadily with no attribution beyond a monthly total. Two dashboards consume most query compute, several clusters run continuously, staging areas have never been cleaned, and no team can state the cost of the product it owns.
- Tag enforcement at provisioning with weekly untagged spend reporting
- Allocation rule for shared platform cost, published and reviewable
- Waste quantification by pattern with measured cost per pattern
- Query optimisation for the top cost drivers using layout changes
- Retention policy per data class with automated expiry
- Unit economics dashboard with cost per order and per active user
Architecture: Provisioning requires owner, cost centre and workload class, and untagged spend is reported weekly as an incident. Shared cost is allocated proportional to direct consumption. Waste is measured by pattern: scanned bytes for layout issues, cluster hours for idle compute, snapshot volume for retention. The largest tables are repartitioned and clustered, dashboards move to summary tables, interactive warehouses auto-suspend, and staging expires automatically. A monthly review converts findings into owned actions with deadlines.
Outcome: Spend becomes predictable and attributable, waste reduction is measured rather than assumed, and budget conversations move to unit economics.
Key Metrics & KPIs
Risks & Mitigation
Maturity Model
Future Roadmap
2026 Trends & Emerging Developments
Career Applications
Frequently Asked Questions
Research References
Continue this lesson with a subscription
Data Engineering & Intelligent Data Platforms is part of the paid catalogue. You have read the free preview. A subscription opens the rest of this lesson, the classroom slides and the assessment questions.
- The full lesson for this topic and every other catalogue topic
- Every classroom slide deck and worked example
- All assessments, with a verifiable certificate on completion
The Free-To-Learn library stays open to everyone and is not affected by this.
