Merged PR 3137: Growth score to reporting
# Description Copies intermediate to reporting for growth score by deal. Schema is copy-paste from intermediate changing the model's name. # 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. - [NA] 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: #22635
This commit is contained in:
parent
a6191eba46
commit
eb213acb9e
4 changed files with 792 additions and 65 deletions
|
|
@ -605,11 +605,12 @@ models:
|
|||
- Total revenue (in gbp)
|
||||
|
||||
The main idea is, for each deal, to compare each of these metrics by
|
||||
checking the latest monthly value vs. the monthly value of the equivalent
|
||||
month on the previous year - in other words, a year-on-year (YoY) comparison.
|
||||
checking the latest monthly value vs. 1) the monthly value of the equivalent
|
||||
month on the previous year and 2) the monthly value of the previous month
|
||||
- in other words, a year-on-year (YoY) and month-on-month (MoM) comparison.
|
||||
We do this comparison by doing a relative incremental.
|
||||
|
||||
The growth score is computed then by averaging the outcome of the 3 scores.
|
||||
The growth score is computed then by averaging the outcome of the 6 scores.
|
||||
Lastly, in order to provide a prioritisation sense, we have a weighted growth
|
||||
score that results from the multiplication of the growth score per the revenue
|
||||
weight a specific deal has provided in the previous 12 months.
|
||||
|
|
@ -687,6 +688,15 @@ models:
|
|||
It can be null if no previous history for that
|
||||
deal is found.
|
||||
|
||||
- name: previous_2_month_first_day_month
|
||||
data_type: date
|
||||
description: |
|
||||
Informative field. It indicates the first day of the
|
||||
month 2 months before with respect to date.
|
||||
If date = 2024-09-30, this field will be 2024-07-01.
|
||||
It can be null if no previous history for that
|
||||
deal is found.
|
||||
|
||||
- name: previous_12_month_first_day_month
|
||||
data_type: date
|
||||
description: |
|
||||
|
|
@ -749,12 +759,22 @@ models:
|
|||
This value can be null, thus indicating that no
|
||||
history is available.
|
||||
|
||||
- name: previous_2_month_revenue_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
Monthly value representing revenue in GBP
|
||||
for a specific deal. This value corresponds to
|
||||
the monthly amount generated 2 months ago
|
||||
This value can be negative.
|
||||
This value can be null, thus indicating that no
|
||||
history is available.
|
||||
|
||||
- name: previous_12_month_revenue_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
Monthly value representing revenue in GBP
|
||||
for a specific deal. This value corresponds to
|
||||
monthly amount generated 12 months ago.
|
||||
the monthly amount generated 12 months ago.
|
||||
This value can be negative.
|
||||
This value can be null, thus indicating that no
|
||||
history is available.
|
||||
|
|
@ -764,7 +784,7 @@ models:
|
|||
description: |
|
||||
Monthly value representing revenue in GBP
|
||||
for a specific deal. This value corresponds to
|
||||
monthly amount generated 13 months ago.
|
||||
the monthly amount generated 13 months ago.
|
||||
This value can be negative.
|
||||
This value can be null, thus indicating that no
|
||||
history is available.
|
||||
|
|
@ -782,6 +802,20 @@ models:
|
|||
min_value: -1
|
||||
strictly: false
|
||||
|
||||
- name: mom_1_month_shift_revenue_growth
|
||||
data_type: decimal
|
||||
description: |
|
||||
Relative increment of the revenue generated in the
|
||||
previous month with respect to the one generated 2
|
||||
months ago.
|
||||
It can be null if any revenue used in the computation
|
||||
is null or it's negative.
|
||||
This field is used for the growth score computation.
|
||||
tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: -1
|
||||
strictly: false
|
||||
|
||||
- name: yoy_revenue_growth
|
||||
data_type: decimal
|
||||
description: |
|
||||
|
|
@ -855,6 +889,7 @@ models:
|
|||
the previous month.
|
||||
It can be null if the bookings created in the
|
||||
previous month are null.
|
||||
This field is used for the growth score computation.
|
||||
tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: -1
|
||||
|
|
@ -920,6 +955,7 @@ models:
|
|||
the previous month.
|
||||
It can be null if the listings booked in month in the
|
||||
previous month are null.
|
||||
This field is used for the growth score computation.
|
||||
tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: -1
|
||||
|
|
@ -1007,7 +1043,18 @@ models:
|
|||
tests:
|
||||
- not_null
|
||||
|
||||
- name: avg_growth_score
|
||||
- name: avg_mom_growth_score
|
||||
data_type: decimal
|
||||
description: |
|
||||
Represents the average score of MoM growth of created
|
||||
bookings, MoM growth of listings booked in month and
|
||||
MoM shifted by one month of revenue.
|
||||
It indicates the tendency of growth of the deal without
|
||||
taking into account its revenue size. It cannot be null.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: avg_yoy_growth_score
|
||||
data_type: decimal
|
||||
description: |
|
||||
Represents the average score of YoY growth of created
|
||||
|
|
@ -1018,6 +1065,17 @@ models:
|
|||
tests:
|
||||
- not_null
|
||||
|
||||
- name: avg_growth_score
|
||||
data_type: decimal
|
||||
description: |
|
||||
Represents the average score of YoY and MoM growth of created
|
||||
bookings, YoY and MoM growth of listings booked in month and
|
||||
YoY and MoM shifted by one month of revenue.
|
||||
It indicates the tendency of growth of the deal without
|
||||
taking into account its revenue size. It cannot be null.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: weighted_avg_growth_score
|
||||
data_type: decimal
|
||||
description: |
|
||||
|
|
@ -1029,3 +1087,22 @@ models:
|
|||
the financial impact this deal tendency can have.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: categorisation_weighted_avg_growth_score
|
||||
data_type: string
|
||||
description: |
|
||||
Discrete categorisation of weighted_avg_growth_score.
|
||||
It helps easily identifying which accounts are top losers,
|
||||
losers, flat, winners and top winners.
|
||||
Currently the categorisation is based on the score itself
|
||||
rather than selecting a top up/down.
|
||||
tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
- TOP LOSER
|
||||
- LOSER
|
||||
- FLAT
|
||||
- WINNER
|
||||
- TOP WINNER
|
||||
- UNSET
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue