Compute unit economics for a pipeline
Turn cluster and warehouse billing into unit economics — cost per run, per 1M rows, per model build — so a regression shows up as a number, not a surprise invoice. The Cost Optimizer starts with attribution; this walkthrough ends with an alert on cost-per-run instead of total spend.
At a glance
| When | Attributing a billing surprise to pipelines and tables; Choosing an alert that survives healthy growth |
|---|---|
| Where | Cost Engineering |
| Why | Total spend is the wrong alert — it rises with growth and hides regressions, while cost-per-unit spikes the day a join starts fanning out. |
Learning objectives
- Attribute compute cost to a pipeline run
- Define a unit metric that resists regressions
- Set an alert on cost-per-run, not on total spend
What you need
- A billing/usage export and pipeline and query logs
- Per-run compute granularity from the cluster or warehouse
- [object Object]
Steps
- Attribute spend to pipelines and tables. (from agent-cost-optimizer )
- Rank by cost and by wasteful ratio (scan vs needed). (from agent-cost-optimizer )
- Pick a unit metric with a stable denominator — $ per pipeline run, $ per 1M rows processed, or DBU/credits per model build. (from skill-cost-unit-economics )
- Total spend rises with growth and hides regressions; cost-per-unit is flat when growth is healthy and spikes the day a join starts fanning out. (from skill-cost-unit-economics )
- Define the unit metric to watch afterwards. (from agent-cost-optimizer )
- Set an alert on cost-per-run, not on total spend. (from skill-cost-unit-economics )
Check yourself
- Cost-per-run stays flat while volume grows and total spend rises in the same period — proving the denominator resists growth.
- A deliberate join fan-out in a test run doubles cost-per-run and fires the alert while total spend still looks normal.
Worked example
The Cost Optimizer workflow — from agent-cost-optimizer
Attribute spend to pipelines and tables.
Rank by cost and by wasteful ratio (scan vs needed).
Propose changes ordered by savings / risk.
Define the unit metric to watch afterwards.
Unit metrics that don't lie — from skill-cost-unit-economics
- $ per pipeline run (stable denominator)
- $ per 1M rows processed
- DBU/credits per model build
Why total spend is the wrong alert — from skill-cost-unit-economics
Total spend rises with growth and hides regressions. Cost-per-unit is flat when
growth is healthy and spikes the day a join starts fanning out.
Sourced from
Security scan
Last sweep 2026-10-24: 0 finding(s), 0 marked as examples.
Common gotchas
- Total spend rises with growth and hides regressions — a healthy month can hide a 4x regression.
- Never accept a recommendation that could change results — the Cost Optimizer flags those for a reason.
- The optimizer never applies a change — apply savings through your own review, not through the agent.
Production considerations
- Define the unit metric to watch after every optimization.
- Validate savings estimates against historical billing after applying the change.
Diagram
billing export
|
|- attribute spend --> pipelines + tables
|
|- rank by cost + wasteful ratio --> top offenders
|
|- define unit metric --> $ per run / per 1M rows --> alert on cost-per-run
Registry stats
| Verification | community · Oct 21, 2026 |
|---|---|
| Completeness | 81 |
| Trust multiplier | ×1.25 |
| Composite | 34.15 · adequate |
| Freshness | 3 days since last source check |
| Difficulty | beginner |
| Version | 0.1.0 |
| License | CC-BY-4.0 |
| Security flags | none |
Did this solve your problem?
Compute unit economics for a pipeline