Merged PR 5058: Propagate API deals to growth score
# Description I opted to name the combination of (Platform) Billable Bookings and (API) Billable Verifications as Billable Items. This is to ensure consistent naming. Changes: * Renamed `int_kpis_projected__agg_daily_billable_bookings` to `int_kpis_projected__agg_daily_billable_items`. This now has a new CTE named combination_of_billable_items that combines both API and Platform billable items. Renamed any "bookings" field to "items". * Renamed `int_kpis_projected__agg_monthly_billable_bookings` to `int_kpis_projected__agg_monthly_billable_items`. Renamed any "bookings" field to "items". * Renamed `int_billable_bookings_growth_score_by_deal` to `int_billable_items_growth_score_by_deal`. This now has a new CTE named `aggregated_monthly_billable_items` that combines the historical information both API and Platform on billable items. Renamed any "bookings" field to "items". * Changes Schema accordingly. Small note here that the assert dimension completeness stops working since there's dimensions specific to API or Platform, thus I removed it. # 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: #29374
This commit is contained in:
parent
8901cc85ec
commit
0ffcfca6a8
6 changed files with 288 additions and 258 deletions
|
|
@ -100,15 +100,17 @@ models:
|
|||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: int_kpis_projected__agg_daily_billable_bookings
|
||||
- name: int_kpis_projected__agg_daily_billable_items
|
||||
description: |
|
||||
This model provides the projected daily billable bookings.
|
||||
This model provides the projected daily billable items, in
|
||||
other words, platform billable bookings and API billable
|
||||
verifications.
|
||||
It considers 2 computations:
|
||||
- The daily billable bookings for the current month,
|
||||
- The daily billable bookings in the past 7 days,
|
||||
- The daily billable items for the current month,
|
||||
- The daily billable items in the past 7 days,
|
||||
and the final value is an arithmetic mean of both.
|
||||
|
||||
This model also retrieves the actual billable bookings to be able
|
||||
This model also retrieves the actual billable items to be able
|
||||
to compare the projected values with the actual ones.
|
||||
|
||||
data_tests:
|
||||
|
|
@ -131,15 +133,13 @@ models:
|
|||
data_type: string
|
||||
description: The dimension or granularity of the metrics.
|
||||
data_tests:
|
||||
- assert_dimension_completeness:
|
||||
metric_column_names:
|
||||
- actual_daily_billable_bookings
|
||||
- accepted_values:
|
||||
values:
|
||||
- global
|
||||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
- by_business_scope
|
||||
- by_service
|
||||
- by_deal
|
||||
|
||||
- name: dimension_value
|
||||
|
|
@ -193,12 +193,12 @@ models:
|
|||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: daily_billable_bookings_for_reporting_source
|
||||
- name: daily_billable_items_for_reporting_source
|
||||
data_type: string
|
||||
description: |
|
||||
The source of the daily billable bookings for reporting.
|
||||
The source of the daily billable items for reporting.
|
||||
This field is used to identify the source of the data displayed
|
||||
in daily_billable_bookings_for_reporting to differentiate between
|
||||
in daily_billable_items_for_reporting to differentiate between
|
||||
the actual and projected values.
|
||||
It's aimed for reforting purposes as any historical month will
|
||||
contain the actual figures.
|
||||
|
|
@ -209,25 +209,25 @@ models:
|
|||
- ACTUAL
|
||||
- PROJECTED
|
||||
|
||||
- name: daily_billable_bookings_for_reporting
|
||||
- name: daily_billable_items_for_reporting
|
||||
data_type: integer
|
||||
description: |
|
||||
The daily billable bookings for reporting purposes.
|
||||
The daily billable items for reporting purposes.
|
||||
This field contains both the actual and projected values.
|
||||
Any date in the future will contain projected values, while
|
||||
any date in the past will contain actual values.
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: daily_billable_bookings_for_evaluation_source
|
||||
- name: daily_billable_items_for_evaluation_source
|
||||
data_type: string
|
||||
description: |
|
||||
Important: This field is used to evaluate the performance
|
||||
of the projections!
|
||||
|
||||
The source of the daily billable bookings for evaluation.
|
||||
The source of the daily billable items for evaluation.
|
||||
This field is used to identify the source of the data displayed
|
||||
in daily_billable_bookings_for_evaluation to differentiate between
|
||||
in daily_billable_items_for_evaluation to differentiate between
|
||||
the actual and projected values.
|
||||
It's aimed for evaluation purposes as any historical month can
|
||||
contain projected figures.
|
||||
|
|
@ -239,13 +239,13 @@ models:
|
|||
- ACTUAL
|
||||
- PROJECTED
|
||||
|
||||
- name: daily_billable_bookings_for_evaluation
|
||||
- name: daily_billable_items_for_evaluation
|
||||
data_type: integer
|
||||
description: |
|
||||
Important: This field is used to evaluate the performance
|
||||
of the projections!
|
||||
|
||||
The daily billable bookings for evaluation purposes.
|
||||
The daily billable items for evaluation purposes.
|
||||
This field contains both the actual and projected values.
|
||||
Any date in the future will contain projected values. Any date
|
||||
in the past which day is after the yesterday day will also contain
|
||||
|
|
@ -254,57 +254,57 @@ models:
|
|||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: projected_daily_billable_bookings
|
||||
- name: projected_daily_billable_items
|
||||
data_type: integer
|
||||
description: |
|
||||
The projected daily billable bookings. This field is the result
|
||||
of the projection of the daily billable bookings for the current month
|
||||
The projected daily billable items. This field is the result
|
||||
of the projection of the daily billable items for the current month
|
||||
and the past 7 days.
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: actual_daily_billable_bookings
|
||||
- name: actual_daily_billable_items
|
||||
description: |
|
||||
The actual billable bookings for the same period as the projected ones.
|
||||
The actual billable items for the same period as the projected ones.
|
||||
This comes from the standard KPIs.
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: same_month_trend_daily_billable_bookings
|
||||
- name: same_month_trend_daily_billable_items
|
||||
data_type: float
|
||||
description: |
|
||||
The average daily billable bookings for the current month.
|
||||
The average daily billable items for the current month.
|
||||
This field is the result of the division of the actual daily billable
|
||||
bookings to date by the number of days available within the current month
|
||||
items to date by the number of days available within the current month
|
||||
to date, and contains decimals.
|
||||
This is just for information purposes.
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: last_7_days_trend_daily_billable_bookings
|
||||
- name: last_7_days_trend_daily_billable_items
|
||||
data_type: float
|
||||
description: |
|
||||
The average daily billable bookings for the past 7 days.
|
||||
The average daily billable items for the past 7 days.
|
||||
This field is the result of the division of the actual daily billable
|
||||
bookings for the past 7 days by 7 days, and contains decimals.
|
||||
items for the past 7 days by 7 days, and contains decimals.
|
||||
This is just for information purposes.
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: same_month_trend_total_billable_bookings
|
||||
- name: same_month_trend_total_billable_items
|
||||
data_type: integer
|
||||
description: |
|
||||
The total billable bookings for the current month.
|
||||
The total billable items for the current month.
|
||||
This field is the result of the sum of the actual daily billable
|
||||
bookings to date.
|
||||
items to date.
|
||||
This is just for information purposes.
|
||||
|
||||
- name: last_7_days_trend_total_billable_bookings
|
||||
- name: last_7_days_trend_total_billable_items
|
||||
data_type: integer
|
||||
description: |
|
||||
The total billable bookings for the past 7 days.
|
||||
The total billable items for the past 7 days.
|
||||
This field is the result of the sum of the actual daily billable
|
||||
bookings for the past 7 days.
|
||||
items for the past 7 days.
|
||||
This is just for information purposes.
|
||||
|
||||
- name: same_month_trend_total_available_days
|
||||
|
|
@ -323,10 +323,12 @@ models:
|
|||
past 7 days.
|
||||
This is just for information purposes.
|
||||
|
||||
- name: int_kpis_projected__agg_monthly_billable_bookings
|
||||
- name: int_kpis_projected__agg_monthly_billable_items
|
||||
description: |
|
||||
This model provides the projected monthly billable bookings per dimension
|
||||
and dimension value. It only considers the current month.
|
||||
This model provides the projected monthly billable items per dimension
|
||||
and dimension value.
|
||||
Billable items are defined as platform billable bookings and API
|
||||
billable verifications. It only considers the current month.
|
||||
Historical data is considered only to assess the performance of the
|
||||
projections.
|
||||
The projection logic is handled on the equivalent daily model,
|
||||
|
|
@ -357,15 +359,13 @@ models:
|
|||
data_type: string
|
||||
description: The dimension or granularity of the metrics.
|
||||
data_tests:
|
||||
- assert_dimension_completeness:
|
||||
metric_column_names:
|
||||
- actual_billable_bookings
|
||||
- accepted_values:
|
||||
values:
|
||||
- global
|
||||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
- by_business_scope
|
||||
- by_service
|
||||
- by_deal
|
||||
|
||||
- name: dimension_value
|
||||
|
|
@ -374,12 +374,12 @@ models:
|
|||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: current_month_projected_billable_bookings
|
||||
- name: current_month_projected_billable_items
|
||||
data_type: integer
|
||||
description: |
|
||||
The projected monthly billable bookings for the current month.
|
||||
This field is the result of the sum of the actual daily billable bookings
|
||||
for the current month to date and the projected daily billable bookings
|
||||
The projected monthly billable items for the current month.
|
||||
This field is the result of the sum of the actual daily billable items
|
||||
for the current month to date and the projected daily billable items
|
||||
for the rest of the days in the month that are in the future.
|
||||
|
||||
The closest we are to the end of the month, the more accurate this value will be.
|
||||
|
|
@ -391,10 +391,10 @@ models:
|
|||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: actual_billable_bookings
|
||||
- name: actual_billable_items
|
||||
data_type: integer
|
||||
description: |
|
||||
The sum of the actual daily billable bookings for the current month to date.
|
||||
The sum of the actual daily billable items for the current month to date.
|
||||
This comes from the standard KPIs.
|
||||
data_tests:
|
||||
- not_null
|
||||
|
|
@ -407,7 +407,7 @@ models:
|
|||
This field is used to assess the performance of the projections.
|
||||
|
||||
This is based on the absolute differences between the projected
|
||||
monthly billable bookings for each previous month vs the actual value.
|
||||
monthly billable items for each previous month vs the actual value.
|
||||
In order to be consistent, it uses the same number of days available
|
||||
for the current month to date as the actual value, and the rest of the days
|
||||
are projected.
|
||||
|
|
@ -425,7 +425,7 @@ models:
|
|||
This field is used to assess the performance of the projections.
|
||||
|
||||
This is based on the absolute percentage differences between the projected
|
||||
monthly billable bookings for each previous month vs the actual value.
|
||||
monthly billable items for each previous month vs the actual value.
|
||||
In order to be consistent, it uses the same number of days available
|
||||
for the current month to date as the actual value, and the rest of the days
|
||||
are projected.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue