Portfolio case study

One governed ARR metric, shown as a demo.

This page is a visual walkthrough of how one executive metric can be defined once, validated properly, and reused through a governed consumption layer without every consumer rebuilding it differently.

Certified Ending ARR Month end only Validation first design dbt and Snowflake BI and AI consumption
What is governed
Meaning
Business ownership defines the metric; data owns the implementation.
What is validated
Logic
Tests, fixtures, contracts, and assertions prove the model works.
What is exposed
Reuse
One certified number for BI, reporting, and AI assisted workflows.
The point is not the stack. The point is the process that makes the number defensible.

Why this was built

ARR is a useful test case because the number only works when the definition is precise enough to survive real operational edge cases and reconciliation across systems. This case study shows how one certified metric becomes a shared contract for the business.

The goal is to make one ARR answer that business leaders, data teams, BI tools, and agents can trust.

ARR definition

ARR is the annualized recurring revenue run rate at month end. In this case study, Ending ARR is the certified number, and net ARR movement explains the monthly change in that number.

One time fees and non recurring revenue are excluded so the metric stays tied to recurring value.

The data org should work closely with business leaders to define the metrics, because they have the clearest view of what can be captured today and what is realistically possible to capture next.

The framework at a glance

The system is intentionally layered so each part has one job and one owner.

1. Define

Set ownership, boundaries, inclusions, and exclusions in plain language.

2. Structure

Build staging, templates, and intermediate layers so upstream and downstream logic stay modular and easy to review.

3. Validate

Use fixtures, tests, and contracts to prove the model behaves as expected.

4. Publish

Expose the certified metric through Snowflake and the semantic layer for reuse.

The walkthrough works because the layers depend on one another. Definition informs structure, structure enables validation, and validation makes publishing trustworthy.

How the project is structured

The model slice

The project centers on one intermediate model that owns ARR eligibility and annualization. That layer is where the business definition becomes code.

If that logic were buried in the final output, the metric would still run, but it would be much harder to review, explain, or defend.

What the lineage proves

  1. Source cleanup is separated from business logic.
  2. The metric logic is isolated and reviewable.
  3. The certified facts are not mixed with draft logic.
  4. Consumption happens through a governed surface, not ad hoc copies.
dbt DAG showing raw sources, staging, intermediate ARR logic, certified marts, and semantic outputs
Figure 1: The full lineage view. Raw sources flow into staging, intermediate logic, certified outputs, and semantic consumption.
The lineage graph is not decoration. It is the quickest proof that the metric has structure, boundaries, and a validation path around it.

How validation works

This is the part that makes the framework credible. Validation is not abstract here. It is visible in the repo as separate artifacts that each catch a different failure mode.

Each snippet below is a trimmed excerpt from the project, chosen to show how the framework protects the metric at different layers.

Data tests

Purpose: catch broken inputs and invalid published values before the metric is consumed.

schema.yml
models:
- name: fct_arr_snapshot
columns:
- name: ending_arr
tests:
- not_null
- dbt_utils.expression_is_true:
expression: "ending_arr >= 0"

Unit tests

Purpose: prove the business logic behaves correctly for a narrow scenario, not just in aggregate.

unit test pattern
select account_id, reporting_month, line_arr
from {{ ref('int_arr_monthly') }}
where billing_interval_months <= 0
or line_arr < 0

Fixtures

Purpose: provide manually checked reference outputs so the team knows what right looks like.

expected_answers.csv
account_id,reporting_month,expected_ending_arr
A-102,2025-03-31,30600.00
A-102,2025-04-30,30240.00
A-204,2025-06-30,25320.00

Contracts and assertions

Purpose: enforce the published shape and guard the certified layer against silent drift.

contract + assertion
config:
contract:
enforced: true

select *
from {{ ref('fct_arr_snapshot') }}
where ending_arr < 0
Each validation method does something different. Together they make the model explainable, reviewable, and hard to misuse.

Validation stack in practice

dbt DAG zoomed into the ARR fact and test nodes
Figure 2: Zoomed lineage view. The production path and validation nodes sit next to each other, making the control plane visible.

Why this matters

Without validation, the line between “it runs” and “it is correct” stays blurry. This framework makes that line visible.

What the reviewer should notice

The output is not being trusted on faith. It is being checked against expected answers, business rules, and explicit contracts before it is consumed.

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. Data and BI tools or agents can consume the same governed surface to generate curated insights about the business.

The point is not to make downstream users think about implementation. The point is to give data, BI tools, and agents one governed metric that already carries the project’s real outcomes.

What was intentionally left out

This is a focused lab, not a complete revenue platform.

Excluded on purpose

  • Live dashboard deployment
  • Multi currency
  • Usage based pricing

Also excluded

  • Row level security
  • Historical type 2 account dimensions
  • Broad KPI catalogues

Those are valid next steps. They would also distract from the thing this piece is trying to show: how a single metric becomes trustworthy enough to reuse.

Why this matters beyond ARR

The broader lesson is not just that metrics should be trustworthy. It is that a governed metric can become shared infrastructure.

Once a number is defined once, tested automatically, and published through a controlled surface, it stops being a local reporting artifact and starts becoming a building block. Finance can reconcile against it. Analysts can reuse it without rewriting the logic. Product and operations can trigger workflows from it. AI can consume it without inventing a private version of the truth.

That is the real payoff: not a prettier dashboard, but a metric the business can build on without re litigating the definition every time it appears.