A minimal, production-shaped ARR metric product with governed definitions, repeatable validation, and a clear operating model from raw inputs to consumable metrics.
This repository demonstrates one certified business metric, Ending ARR, implemented as a governed data product rather than a loose analytics demo. The local MVP uses DuckDB for reproducible validation and includes the Snowflake deployment path as part of the operating model, not as an afterthought.
- one metric can be defined explicitly and certified end to end;
- business rules can be owned, versioned, tested, and reviewed;
- public marts can be protected with contracts;
- semantic consumption can sit on top of governed definitions; and
- CI/CD can validate the pipeline before deployment.
- it is not a full finance system;
- it is not a live production ingestion pipeline in the local lab;
- it does not prove a hosted dbt Semantic Layer query path locally; and
- it is intentionally scoped to one metric, not a broad analytics platform.
- One governed metric, Ending ARR, defined end to end.
- Real ARR edge cases: billing intervals, discounts, exclusions, churn, reactivation, and renewals.
- A documented metric contract, singular business tests, and model/unit tests that prove the logic.
- A governed consumption story that distinguishes certified BI and AI reuse from raw-table interpretation.
- A reproducible local build that reviewers can run with Docker only.
These two views show the shape of the system without making the README a wall of text.
The project follows a pattern used by stronger revenue analytics teams: keep raw inputs separate, derive historical truth with effective dates, and expose a clean consumption layer on top. In practice that means the ARR logic is anchored in point-in-time snapshot facts rather than current-state rows, so month-end truth stays stable and explainable. The same separation also makes it easier to publish a certified dataset for BI or semantic consumption without asking downstream users to interpret raw source tables directly.
This repo is scoped as a lab rather than a full production platform. Deferred items include live Metabase dashboards, live Snowflake semantic execution in this workspace, recognized ARR reconciliation, production orchestration, row-level security, multi-currency, usage-based pricing, and historical type-2 account dimensions.
That boundary is deliberate: it keeps the case study focused on proving one metric deeply instead of spreading effort across too many unfinished surfaces.
Prerequisite: a running Docker daemon.
docker compose build
docker compose run --rm dbt build
docker compose run --rm --entrypoint python dbt scripts/query_results.pyExpected certified Ending ARR:
2025-01-31 | 19560.00
2025-02-28 | 21960.00
2025-03-31 | 30600.00
2025-04-30 | 30240.00
2025-05-31 | 25320.00
2025-06-30 | 25320.00
Inspect the local deployment:
make inspectGenerate and serve dbt docs at http://localhost:8080:
make docs
make docs-serveConfigure .env from .env.example, then validate and deploy to Snowflake:
make debug-prod
make build-proddocs/metric_contract_arr.mdfor the certified metric contract.docs/singular_business_tests.mdfor the human-readable test catalog.snowflake_semantic_views/snowflake_revenue_metrics.sqlfor the native Snowflake semantic view.docs/ci_cd.mdfor GitHub Actions validation and Snowflake deployment.

