Merged PR 4941: KPIs refactor Stage 4: Switch onboarding MRR to new KPIs model

# Description

Puts in production the new KPIs model for Onboarding MRR.

The change has been validated with MD5 trick.

# Checklist

- [X] The edited models and dependants run properly with production data.
- [X] The edited models are sufficiently documented.
- [X] The edited models contain PK tests, and I've ran and passed them.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #28949
This commit is contained in:
Oriol Roqué Paniagua 2025-04-07 14:07:00 +00:00
parent dc8eee7128
commit 34ac83b3ec

View file

@ -174,13 +174,10 @@ with
dimension in ('global', 'by_number_of_listings', 'by_billing_country', 'by_business_scope')
and dimension_value <> 'UNSET'
),
int_monthly_onboarding_mrr_per_deal as (
select * from {{ ref("int_monthly_onboarding_mrr_per_deal") }}
int_kpis__agg_monthly_onboarding_mrr as (
select *
from {{ ref("int_kpis__agg_monthly_onboarding_mrr")}}
),
int_mtd_agg_onboarding_mrr_revenue as (
select * from {{ ref("int_mtd_agg_onboarding_mrr_revenue") }}
),
plain_kpi_combination as (
select
@ -361,8 +358,8 @@ with
as revenue_retained_post_resolutions_ratio,
-- ONBOARDING MRR METRIC --
onboarding_mrr.expected_mrr_per_deal,
onboarding_mrr_revenue.expected_mrr
onboarding_mrr.onboarding_mrr_per_new_deal_in_gbp as expected_mrr_per_deal,
onboarding_mrr.total_onboarding_mrr_in_gbp as expected_mrr
from int_kpis__agg_dates_main_kpis d
left join
@ -431,15 +428,10 @@ with
and d.dimension = churn.dimension
and d.dimension_value = churn.dimension_value
left join
int_monthly_onboarding_mrr_per_deal onboarding_mrr
int_kpis__agg_monthly_onboarding_mrr onboarding_mrr
on d.date = onboarding_mrr.date
and d.dimension = onboarding_mrr.dimension
and d.dimension_value = onboarding_mrr.dimension_value
left join
int_mtd_agg_onboarding_mrr_revenue onboarding_mrr_revenue
on d.date = onboarding_mrr_revenue.date
and d.dimension = onboarding_mrr_revenue.dimension
and d.dimension_value = onboarding_mrr_revenue.dimension_value
left join
total_and_retained_revenue
on d.date = total_and_retained_revenue.end_date