Merged PR 3279: Remove unused code: additive contribution to churn and its metrics
# Description Simplifies the code for the models: * int_monthly_12m_window_contribution_by_deal * int_monthly_churn_metrics By just removing the additive contribution approach. This also reduces the schema file information of these 2 models. I also adapted the description to clarify the state of the models. No rush to merge this. # 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: #22691
This commit is contained in:
parent
689ea53c11
commit
5c1f6f88f2
3 changed files with 5 additions and 132 deletions
|
|
@ -1249,26 +1249,13 @@ models:
|
|||
- created_bookings
|
||||
- listings_booked_in_month
|
||||
|
||||
There's 2 different contribution methods, the additive and
|
||||
the average approach. The additive approach will "penalise"
|
||||
accounts that have been active for less than 12 months on the
|
||||
contribution amount, while the average approach "boosts" the
|
||||
contribution of those accounts that have been active for less
|
||||
than 12 months.
|
||||
|
||||
Mathematically speaking, it is encouraged to use the additive
|
||||
approach ;-)
|
||||
|
||||
Find below the details of the computation:
|
||||
- Additive approach:
|
||||
Over a period of 12 months, sum the value of a given a metric
|
||||
for each deal. Sum all the deals to get a global. Divide the
|
||||
deal value vs. the global one.
|
||||
- Average approach:
|
||||
The contribution is based on an Average approach:
|
||||
Over a period of 12 months, sum the value of a given a metric
|
||||
for each deal, and divide it by the amount of months we're considering
|
||||
for that deal. Sum all the average amounts per deals to get a global.
|
||||
Divide the avg per deal value vs. the sum of avgs global one.
|
||||
The average approach "boosts" the contribution of those accounts
|
||||
that have been active for less than 12 months.
|
||||
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
|
|
@ -1322,42 +1309,6 @@ models:
|
|||
preceding_months_count_by_deal, and will be true on the first
|
||||
year of deal activity.
|
||||
|
||||
- name: total_revenue_12m_additive_contribution
|
||||
data_type: numeric
|
||||
description: |
|
||||
Share of the deal contribution on total revenue
|
||||
vs. the global amount, on the preceding 12 months
|
||||
with respect to date. It uses the additive approach.
|
||||
It can be negative.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: created_bookings_12m_additive_contribution
|
||||
data_type: numeric
|
||||
description: |
|
||||
Share of the deal contribution on created bookings
|
||||
vs. the global amount, on the preceding 12 months
|
||||
with respect to date. It uses the additive approach.
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
max_value: 1
|
||||
strictly: false
|
||||
|
||||
- name: listings_booked_in_month_12m_additive_contribution
|
||||
data_type: numeric
|
||||
description: |
|
||||
Share of the deal contribution on listings booked in month
|
||||
vs. the global amount, on the preceding 12 months
|
||||
with respect to date. It uses the additive approach.
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
max_value: 1
|
||||
strictly: false
|
||||
|
||||
- name: total_revenue_12m_average_contribution
|
||||
data_type: numeric
|
||||
description: |
|
||||
|
|
@ -1407,11 +1358,11 @@ models:
|
|||
This model retrieves the 12 month contribution to global metrics
|
||||
by deal and aggregates it to dimension and dimension value for those
|
||||
deals that are tagged as '05-Churning' in that month. Thus, it provides
|
||||
a total of 6 churn related metrics, represented as ratios over the total:
|
||||
a total of 3 churn related metrics, represented as ratios over the total:
|
||||
- Total Revenue (in GBP)
|
||||
- Created Bookings
|
||||
- Listings Booked in Month
|
||||
In two ways of computing the contribution, Additive and Average. For further
|
||||
by using the Average contribution method. For further
|
||||
information, please refer to the documentation of the model:
|
||||
- int_monthly_12m_window_contribution_by_deal
|
||||
|
||||
|
|
@ -1450,18 +1401,6 @@ models:
|
|||
tests:
|
||||
- not_null
|
||||
|
||||
- name: total_revenue_churn_additive_contribution
|
||||
data_type: numeric
|
||||
description: Total Revenue churn rate (additive approach).
|
||||
|
||||
- name: created_bookings_churn_additive_contribution
|
||||
data_type: numeric
|
||||
description: Created Bookings churn rate (additive approach).
|
||||
|
||||
- name: listings_booked_in_month_churn_additive_contribution
|
||||
data_type: numeric
|
||||
description: Listings Booked in Month churn rate (additive approach).
|
||||
|
||||
- name: total_revenue_churn_average_contribution
|
||||
data_type: numeric
|
||||
description: Total Revenue churn rate (average approach).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue