Building One Governed ARR Metric
A practical case study in defining, validating, and exposing Ending ARR as a governed metric product. The point is not to calculate more metrics. The point is to make one metric stable enough that people can stop arguing about the number and start using it.
Why ARR Is the Right Test Case
ARR looks simple until it has to be made real. Then the edge cases show up immediately: monthly, quarterly, and annual billing; discounts; one time fees; churn and reactivation; renewal uplift; and historical inclusion even when a subscription is later cancelled. That is where ownership, controls, and reconciliation start to matter.
Most ARR implementations fail for a familiar reason: the definition is treated as an implementation detail. Different teams then calculate the same number in different ways and spend time reconciling why the answers do not match.
This project avoids that pattern by focusing on one metric, Ending ARR, and treating the metric itself as the product.
What the Project Actually Does
The repo implements one governed metric end to end. It is intentionally narrow, but the implementation goes deep enough to show the full chain that matters in practice: definition, ownership, validation, lineage, and governed consumption.
- Synthetic Salesforce-style seed data
- Staging models that standardize names and types
- One intermediate model that owns ARR eligibility and annualization
- Certified month-end ARR and movement facts
- dbt semantic models for governed consumption
- A Snowflake semantic view path for BI and AI
- Hand-calculated fixtures, singular tests, unit tests, and model contracts

The Trust Stack
The strongest part of the project is not any single model. It is the stack of controls around the metric.
Who owns the metric, what it means, and what it is not.
Effective dates, eligibility, annualization, and exclusions.
Independent fixture totals calculated before implementation.
Singular tests, unit tests, and contract enforcement.
A certified surface so BI and AI do not rebuild the logic differently.
How the Lineage Works
The lineage is built in layers. Raw source tables flow into staging models, staging feeds one intermediate ARR model, and that intermediate logic feeds the certified facts. Expected-answer models sit beside the production flow, and assertion models validate the logic instead of assuming it is correct.

That is the difference between 'the code runs' and 'the metric is defensible.' The graph also makes ownership visible because you can trace the final ARR output back to the rule layer that produced it.
Snowflake Semantic Layer Implementation
The Snowflake layer is implemented as a SQL based semantic view in `snowflake_semantic_views/snowflake_revenue_metrics.sql`. The object is validated with Snowflake metadata checks, and its behavior is proven with `semantic_view()` queries that return certified `ending_arr` and `net_arr_movement` outputs. The screenshots below show the definition, the exposed concepts, and the resulting governed answers. Cortex Analyst, among others, can consume the governed surface to generate curated insights about the business.





What Makes It Portfolio-Worthy
- Depth over breadth: one metric, fully worked through
- Governance: business ownership, change control, and invalid use boundaries
- Verification: tests and hand calculated fixtures, not just 'it runs'
- Controlled reuse: certified meaning as the prerequisite for safe BI and AI consumption
This is a lab, not a full production platform. I intentionally left out a live dashboard deployment, multi-currency, usage-based pricing, row-level security, and historical type-2 account dimensions.
The Takeaway
If you want AI to be useful in revenue operations, first make the metric trustworthy for humans.
Once the metric is governed, tested, and certified, AI can safely consume it instead of improvising over raw tables.