Back to writing
Data Engineering·Jun 2026·8 min read

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.

OK
Ofer Kulka
Staff Data & Analytics Engineer

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
ARR lineage graph showing raw sources, staging models, certified facts, expected-answer fixtures, and semantic consumption
Fig 01, Certified ARR lineage from raw inputs to governed consumption

The Trust Stack

The strongest part of the project is not any single model. It is the stack of controls around the metric.

Metric contract

Who owns the metric, what it means, and what it is not.

Business rules

Effective dates, eligibility, annualization, and exclusions.

Expected answers

Independent fixture totals calculated before implementation.

Tests

Singular tests, unit tests, and contract enforcement.

Semantic consumption

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.

Zoomed ARR lineage graph showing production models, expected-answer fixtures, and assertion models
Fig 02, Production models and assertions hanging off the governed metric path

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.

Snowflake semantic view details showing the REVENUE_METRICS semantic view and its governance metadata
Fig 03, Semantic view definition and governance metadata
Snowflake semantic metrics list showing certified Ending ARR and net ARR movement
Fig 04, Semantic metrics for certified Ending ARR and net ARR movement
Snowflake semantic dimensions showing accounts and ARR dimensions with comments and synonyms
Fig 05, Semantic dimensions and governed field definitions
Snowflake result set showing certified Ending ARR by reporting date
Fig 06, Certified Ending ARR query result
Snowflake result set showing ARR movement types and net ARR movement
Fig 07, ARR movement classification by month

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

Core pattern

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.

Ofer Kulka

© 2026 Ofer Kulka · Data you can trust