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
|
|
@ -1,115 +0,0 @@
|
||||||
{{ config(materialized="table", unique_key=["end_date", "id_deal"]) }}
|
|
||||||
with
|
|
||||||
int_kpis_projected__agg_monthly_billable_bookings as (
|
|
||||||
select *
|
|
||||||
from {{ ref("int_kpis_projected__agg_monthly_billable_bookings") }}
|
|
||||||
where dimension = 'by_deal' and dimension_value <> 'UNSET'
|
|
||||||
),
|
|
||||||
int_kpis__agg_monthly_billable_bookings as (
|
|
||||||
select *
|
|
||||||
from {{ ref("int_kpis__agg_monthly_billable_bookings") }}
|
|
||||||
where dimension = 'by_deal' and dimension_value <> 'UNSET'
|
|
||||||
),
|
|
||||||
billable_bookings_per_month_with_projection as (
|
|
||||||
select
|
|
||||||
start_date,
|
|
||||||
end_date,
|
|
||||||
dimension_value as id_deal,
|
|
||||||
current_month_projected_billable_bookings
|
|
||||||
as current_month_billable_bookings,
|
|
||||||
current_month_projected_billable_bookings
|
|
||||||
/ sum(current_month_projected_billable_bookings) over (
|
|
||||||
partition by end_date order by end_date
|
|
||||||
) as current_month_share_billable_bookings,
|
|
||||||
historical_monthly_mean_absolute_error as projection_mean_absolute_error,
|
|
||||||
historical_monthly_mean_absolute_percentage_error
|
|
||||||
as projection_mean_absolute_percentage_error,
|
|
||||||
true as are_billable_bookings_projected
|
|
||||||
from int_kpis_projected__agg_monthly_billable_bookings
|
|
||||||
union all
|
|
||||||
select
|
|
||||||
start_date,
|
|
||||||
end_date,
|
|
||||||
dimension_value as id_deal,
|
|
||||||
billable_bookings as current_month_billable_bookings,
|
|
||||||
billable_bookings / sum(billable_bookings) over (
|
|
||||||
partition by end_date order by end_date
|
|
||||||
) as current_month_share_billable_bookings,
|
|
||||||
null as projection_mean_absolute_error,
|
|
||||||
null as projection_mean_absolute_percentage_error,
|
|
||||||
false as are_billable_bookings_projected
|
|
||||||
from int_kpis__agg_monthly_billable_bookings
|
|
||||||
),
|
|
||||||
billable_bookings_growth_score as (
|
|
||||||
select
|
|
||||||
start_date,
|
|
||||||
end_date,
|
|
||||||
id_deal,
|
|
||||||
-- Billable Bookings (Absolute) --
|
|
||||||
current_month_billable_bookings,
|
|
||||||
avg(current_month_billable_bookings) over (
|
|
||||||
partition by id_deal
|
|
||||||
order by end_date asc
|
|
||||||
rows between 3 preceding and 1 preceding
|
|
||||||
) as prior_3_months_avg_monthly_billable_bookings,
|
|
||||||
current_month_billable_bookings
|
|
||||||
/ avg(current_month_billable_bookings) over (
|
|
||||||
partition by id_deal
|
|
||||||
order by end_date asc
|
|
||||||
rows between 3 preceding and 1 preceding
|
|
||||||
)
|
|
||||||
- 1 as growth_vs_prior_3_avg_billable_bookings,
|
|
||||||
|
|
||||||
-- Share of Billable Bookings per Deal over Total --
|
|
||||||
current_month_share_billable_bookings,
|
|
||||||
avg(current_month_share_billable_bookings) over (
|
|
||||||
partition by id_deal
|
|
||||||
order by end_date asc
|
|
||||||
rows between 3 preceding and 1 preceding
|
|
||||||
) as prior_3_months_avg_monthly_share_billable_bookings,
|
|
||||||
current_month_share_billable_bookings
|
|
||||||
/ avg(current_month_share_billable_bookings) over (
|
|
||||||
partition by id_deal
|
|
||||||
order by end_date asc
|
|
||||||
rows between 3 preceding and 1 preceding
|
|
||||||
)
|
|
||||||
- 1 as growth_vs_prior_3_avg_share_billable_bookings,
|
|
||||||
-- Projection Reference --
|
|
||||||
projection_mean_absolute_error,
|
|
||||||
projection_mean_absolute_percentage_error,
|
|
||||||
are_billable_bookings_projected
|
|
||||||
from billable_bookings_per_month_with_projection
|
|
||||||
)
|
|
||||||
select
|
|
||||||
start_date,
|
|
||||||
end_date,
|
|
||||||
id_deal,
|
|
||||||
-- Billable Bookings (Absolute) --
|
|
||||||
current_month_billable_bookings,
|
|
||||||
prior_3_months_avg_monthly_billable_bookings,
|
|
||||||
-- Share of Billable Bookings per Deal over Total --
|
|
||||||
current_month_share_billable_bookings,
|
|
||||||
prior_3_months_avg_monthly_share_billable_bookings,
|
|
||||||
-- Specific Growth Scores --
|
|
||||||
growth_vs_prior_3_avg_billable_bookings,
|
|
||||||
growth_vs_prior_3_avg_share_billable_bookings,
|
|
||||||
-- Combined Growth Score --
|
|
||||||
least(
|
|
||||||
greatest(
|
|
||||||
coalesce(
|
|
||||||
(
|
|
||||||
growth_vs_prior_3_avg_billable_bookings
|
|
||||||
+ growth_vs_prior_3_avg_share_billable_bookings
|
|
||||||
)
|
|
||||||
/ 2,
|
|
||||||
0
|
|
||||||
),
|
|
||||||
-1
|
|
||||||
),
|
|
||||||
1
|
|
||||||
) as growth_score,
|
|
||||||
-- Projection Reference --
|
|
||||||
projection_mean_absolute_error,
|
|
||||||
projection_mean_absolute_percentage_error,
|
|
||||||
are_billable_bookings_projected
|
|
||||||
from billable_bookings_growth_score
|
|
||||||
|
|
@ -0,0 +1,133 @@
|
||||||
|
{{ config(materialized="table", unique_key=["end_date", "id_deal"]) }}
|
||||||
|
with
|
||||||
|
int_kpis_projected__agg_monthly_billable_items as (
|
||||||
|
select *
|
||||||
|
from {{ ref("int_kpis_projected__agg_monthly_billable_items") }}
|
||||||
|
where dimension = 'by_deal' and dimension_value <> 'UNSET'
|
||||||
|
),
|
||||||
|
int_kpis__agg_monthly_billable_bookings as (
|
||||||
|
select *
|
||||||
|
from {{ ref("int_kpis__agg_monthly_billable_bookings") }}
|
||||||
|
where dimension = 'by_deal' and dimension_value <> 'UNSET'
|
||||||
|
),
|
||||||
|
int_kpis__agg_monthly_api_billable_verifications as (
|
||||||
|
select *
|
||||||
|
from {{ ref("int_kpis__agg_monthly_api_billable_verifications") }}
|
||||||
|
where dimension = 'by_deal' and dimension_value <> 'UNSET'
|
||||||
|
),
|
||||||
|
aggregated_monthly_billable_items as (
|
||||||
|
select
|
||||||
|
start_date,
|
||||||
|
end_date,
|
||||||
|
dimension_value as id_deal,
|
||||||
|
billable_bookings as current_month_billable_items
|
||||||
|
from int_kpis__agg_monthly_billable_bookings
|
||||||
|
union all
|
||||||
|
select
|
||||||
|
start_date,
|
||||||
|
end_date,
|
||||||
|
dimension_value as id_deal,
|
||||||
|
billable_verifications as current_month_billable_items
|
||||||
|
from int_kpis__agg_monthly_api_billable_verifications
|
||||||
|
),
|
||||||
|
billable_items_per_month_with_projection as (
|
||||||
|
select
|
||||||
|
start_date,
|
||||||
|
end_date,
|
||||||
|
dimension_value as id_deal,
|
||||||
|
current_month_projected_billable_items as current_month_billable_items,
|
||||||
|
current_month_projected_billable_items
|
||||||
|
/ sum(current_month_projected_billable_items) over (
|
||||||
|
partition by end_date order by end_date
|
||||||
|
) as current_month_share_billable_items,
|
||||||
|
historical_monthly_mean_absolute_error as projection_mean_absolute_error,
|
||||||
|
historical_monthly_mean_absolute_percentage_error
|
||||||
|
as projection_mean_absolute_percentage_error,
|
||||||
|
true as are_billable_items_projected
|
||||||
|
from int_kpis_projected__agg_monthly_billable_items
|
||||||
|
union all
|
||||||
|
select
|
||||||
|
start_date,
|
||||||
|
end_date,
|
||||||
|
id_deal,
|
||||||
|
current_month_billable_items,
|
||||||
|
current_month_billable_items / sum(current_month_billable_items) over (
|
||||||
|
partition by end_date order by end_date
|
||||||
|
) as current_month_share_billable_items,
|
||||||
|
null as projection_mean_absolute_error,
|
||||||
|
null as projection_mean_absolute_percentage_error,
|
||||||
|
false as are_billable_items_projected
|
||||||
|
from aggregated_monthly_billable_items
|
||||||
|
),
|
||||||
|
billable_items_growth_score as (
|
||||||
|
select
|
||||||
|
start_date,
|
||||||
|
end_date,
|
||||||
|
id_deal,
|
||||||
|
-- Billable Bookings (Absolute) --
|
||||||
|
current_month_billable_items,
|
||||||
|
avg(current_month_billable_items) over (
|
||||||
|
partition by id_deal
|
||||||
|
order by end_date asc
|
||||||
|
rows between 3 preceding and 1 preceding
|
||||||
|
) as prior_3_months_avg_monthly_billable_items,
|
||||||
|
current_month_billable_items / avg(current_month_billable_items) over (
|
||||||
|
partition by id_deal
|
||||||
|
order by end_date asc
|
||||||
|
rows between 3 preceding and 1 preceding
|
||||||
|
)
|
||||||
|
- 1 as growth_vs_prior_3_avg_billable_items,
|
||||||
|
|
||||||
|
-- Share of Billable Bookings per Deal over Total --
|
||||||
|
current_month_share_billable_items,
|
||||||
|
avg(current_month_share_billable_items) over (
|
||||||
|
partition by id_deal
|
||||||
|
order by end_date asc
|
||||||
|
rows between 3 preceding and 1 preceding
|
||||||
|
) as prior_3_months_avg_monthly_share_billable_items,
|
||||||
|
current_month_share_billable_items
|
||||||
|
/ avg(current_month_share_billable_items) over (
|
||||||
|
partition by id_deal
|
||||||
|
order by end_date asc
|
||||||
|
rows between 3 preceding and 1 preceding
|
||||||
|
)
|
||||||
|
- 1 as growth_vs_prior_3_avg_share_billable_items,
|
||||||
|
-- Projection Reference --
|
||||||
|
projection_mean_absolute_error,
|
||||||
|
projection_mean_absolute_percentage_error,
|
||||||
|
are_billable_items_projected
|
||||||
|
from billable_items_per_month_with_projection
|
||||||
|
)
|
||||||
|
select
|
||||||
|
start_date,
|
||||||
|
end_date,
|
||||||
|
id_deal,
|
||||||
|
-- Billable Bookings (Absolute) --
|
||||||
|
current_month_billable_items,
|
||||||
|
prior_3_months_avg_monthly_billable_items,
|
||||||
|
-- Share of Billable Bookings per Deal over Total --
|
||||||
|
current_month_share_billable_items,
|
||||||
|
prior_3_months_avg_monthly_share_billable_items,
|
||||||
|
-- Specific Growth Scores --
|
||||||
|
growth_vs_prior_3_avg_billable_items,
|
||||||
|
growth_vs_prior_3_avg_share_billable_items,
|
||||||
|
-- Combined Growth Score --
|
||||||
|
least(
|
||||||
|
greatest(
|
||||||
|
coalesce(
|
||||||
|
(
|
||||||
|
growth_vs_prior_3_avg_billable_items
|
||||||
|
+ growth_vs_prior_3_avg_share_billable_items
|
||||||
|
)
|
||||||
|
/ 2,
|
||||||
|
0
|
||||||
|
),
|
||||||
|
-1
|
||||||
|
),
|
||||||
|
1
|
||||||
|
) as growth_score,
|
||||||
|
-- Projection Reference --
|
||||||
|
projection_mean_absolute_error,
|
||||||
|
projection_mean_absolute_percentage_error,
|
||||||
|
are_billable_items_projected
|
||||||
|
from billable_items_growth_score
|
||||||
|
|
@ -3225,18 +3225,18 @@ models:
|
||||||
When precision and recall are far apart, the F2 score will be closer to the
|
When precision and recall are far apart, the F2 score will be closer to the
|
||||||
lower of the two.
|
lower of the two.
|
||||||
|
|
||||||
- name: int_billable_bookings_growth_score_by_deal
|
- name: int_billable_items_growth_score_by_deal
|
||||||
description: |
|
description: |
|
||||||
This model computes the growth score of the billable bookings for each deal.
|
This model computes the growth score of the billable items for each deal.
|
||||||
The growth score is computed as the average between:
|
The growth score is computed as the average between:
|
||||||
- The billable bookings of a given month vs. the average of the previous
|
- The billable items of a given month vs. the average of the previous
|
||||||
3 months.
|
3 months.
|
||||||
- The share a deal has in terms of billable bookings of a given month
|
- The share a deal has in terms of billable items of a given month
|
||||||
if compared to the rest of the deals vs. the average of the previous 3
|
if compared to the rest of the deals vs. the average of the previous 3
|
||||||
months.
|
months.
|
||||||
The growth score is capped between -1 and 1.
|
The growth score is capped between -1 and 1.
|
||||||
It is important to note that if we check the current month, the count of
|
It is important to note that if we check the current month, the count of
|
||||||
billable bookings and the corresponding share will be based on the projection,
|
billable items and the corresponding share will be based on the projection,
|
||||||
rather than the actual figure. In this case, the MAE and MAPE of the projected
|
rather than the actual figure. In this case, the MAE and MAPE of the projected
|
||||||
value are indicated in the model.
|
value are indicated in the model.
|
||||||
While the growth score is computed at a monthly basis, the value will update
|
While the growth score is computed at a monthly basis, the value will update
|
||||||
|
|
@ -3274,12 +3274,12 @@ models:
|
||||||
data_tests:
|
data_tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|
||||||
- name: current_month_billable_bookings
|
- name: current_month_billable_items
|
||||||
data_type: integer
|
data_type: integer
|
||||||
description: |
|
description: |
|
||||||
Monthly billable bookings. If the month is in progress
|
Monthly billable items. If the month is in progress
|
||||||
then this value corresponds to the projected figure.
|
then this value corresponds to the projected figure.
|
||||||
This is indicated by "are_billable_bookings_projected"
|
This is indicated by "are_billable_items_projected"
|
||||||
flag.
|
flag.
|
||||||
data_tests:
|
data_tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|
@ -3287,10 +3287,10 @@ models:
|
||||||
min_value: 0
|
min_value: 0
|
||||||
strictly: false
|
strictly: false
|
||||||
|
|
||||||
- name: prior_3_months_avg_monthly_billable_bookings
|
- name: prior_3_months_avg_monthly_billable_items
|
||||||
data_type: integer
|
data_type: integer
|
||||||
description: |
|
description: |
|
||||||
Average of the billable bookings for the previous 3 months.
|
Average of the billable items for the previous 3 months.
|
||||||
If the selected range is from 1st April 2025 to 30th April 2025,
|
If the selected range is from 1st April 2025 to 30th April 2025,
|
||||||
then this average will be based between 1st January 2025 to
|
then this average will be based between 1st January 2025 to
|
||||||
31st March 2025.
|
31st March 2025.
|
||||||
|
|
@ -3299,12 +3299,12 @@ models:
|
||||||
min_value: 0
|
min_value: 0
|
||||||
strictly: false
|
strictly: false
|
||||||
|
|
||||||
- name: current_month_share_billable_bookings
|
- name: current_month_share_billable_items
|
||||||
data_type: decimal
|
data_type: decimal
|
||||||
description: |
|
description: |
|
||||||
Share of the billable bookings for a given deal in the current month.
|
Share of the billable items for a given deal in the current month.
|
||||||
If the month is in progress then this value corresponds to the
|
If the month is in progress then this value corresponds to the
|
||||||
projected figure. This is indicated by "are_billable_bookings_projected"
|
projected figure. This is indicated by "are_billable_items_projected"
|
||||||
flag.
|
flag.
|
||||||
data_tests:
|
data_tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|
@ -3312,10 +3312,10 @@ models:
|
||||||
min_value: 0
|
min_value: 0
|
||||||
strictly: false
|
strictly: false
|
||||||
|
|
||||||
- name: prior_3_months_avg_monthly_share_billable_bookings
|
- name: prior_3_months_avg_monthly_share_billable_items
|
||||||
data_type: decimal
|
data_type: decimal
|
||||||
description: |
|
description: |
|
||||||
Average of the share of the billable bookings for a given deal in the
|
Average of the share of the billable items for a given deal in the
|
||||||
previous 3 months. If the selected range is from 1st April 2025 to
|
previous 3 months. If the selected range is from 1st April 2025 to
|
||||||
30th April 2025, then this average will be based between 1st January
|
30th April 2025, then this average will be based between 1st January
|
||||||
2025 to 31st March 2025.
|
2025 to 31st March 2025.
|
||||||
|
|
@ -3324,21 +3324,21 @@ models:
|
||||||
min_value: 0
|
min_value: 0
|
||||||
strictly: false
|
strictly: false
|
||||||
|
|
||||||
- name: growth_vs_prior_3_avg_billable_bookings
|
- name: growth_vs_prior_3_avg_billable_items
|
||||||
data_type: decimal
|
data_type: decimal
|
||||||
description: |
|
description: |
|
||||||
Growth score of the billable bookings based purely on the relative
|
Growth score of the billable items based purely on the relative
|
||||||
difference between the current month billable bookings vs. the
|
difference between the current month billable items vs. the
|
||||||
prior 3 months average.
|
prior 3 months average.
|
||||||
This is a subcomputation of the growth score, for information
|
This is a subcomputation of the growth score, for information
|
||||||
purposes.
|
purposes.
|
||||||
It can be null.
|
It can be null.
|
||||||
|
|
||||||
- name: growth_vs_prior_3_avg_share_billable_bookings
|
- name: growth_vs_prior_3_avg_share_billable_items
|
||||||
data_type: decimal
|
data_type: decimal
|
||||||
description: |
|
description: |
|
||||||
Growth score of the billable bookings based purely on the relative
|
Growth score of the billable items based purely on the relative
|
||||||
difference between the current month share billable bookings vs. the
|
difference between the current month share billable items vs. the
|
||||||
prior 3 months average.
|
prior 3 months average.
|
||||||
This is a subcomputation of the growth score, for information
|
This is a subcomputation of the growth score, for information
|
||||||
purposes.
|
purposes.
|
||||||
|
|
@ -3347,10 +3347,10 @@ models:
|
||||||
- name: growth_score
|
- name: growth_score
|
||||||
data_type: decimal
|
data_type: decimal
|
||||||
description: |
|
description: |
|
||||||
Growth score of the billable bookings, based on the average between:
|
Growth score of the billable items, based on the average between:
|
||||||
- The billable bookings of a given month vs. the average of the previous
|
- The billable items of a given month vs. the average of the previous
|
||||||
3 months.
|
3 months.
|
||||||
- The share a deal has in terms of billable bookings of a given month
|
- The share a deal has in terms of billable items of a given month
|
||||||
if compared to the rest of the deals vs. the average of the previous 3
|
if compared to the rest of the deals vs. the average of the previous 3
|
||||||
months.
|
months.
|
||||||
The growth score is capped between -1 and 1.
|
The growth score is capped between -1 and 1.
|
||||||
|
|
@ -3365,7 +3365,7 @@ models:
|
||||||
- name: projection_mean_absolute_error
|
- name: projection_mean_absolute_error
|
||||||
data_type: decimal
|
data_type: decimal
|
||||||
description: |
|
description: |
|
||||||
Mean absolute error of the projection of the billable bookings.
|
Mean absolute error of the projection of the billable items.
|
||||||
It is null if the month is not in progress or value is projected
|
It is null if the month is not in progress or value is projected
|
||||||
but there's no prior data to compare the projection against.
|
but there's no prior data to compare the projection against.
|
||||||
data_tests:
|
data_tests:
|
||||||
|
|
@ -3376,7 +3376,7 @@ models:
|
||||||
- name: projection_mean_absolute_percentage_error
|
- name: projection_mean_absolute_percentage_error
|
||||||
data_type: decimal
|
data_type: decimal
|
||||||
description: |
|
description: |
|
||||||
Mean absolute percentage error of the projection of the billable bookings.
|
Mean absolute percentage error of the projection of the billable items.
|
||||||
It is null if the month is not in progress or value is projected
|
It is null if the month is not in progress or value is projected
|
||||||
but there's no prior data to compare the projection against.
|
but there's no prior data to compare the projection against.
|
||||||
data_tests:
|
data_tests:
|
||||||
|
|
@ -3384,12 +3384,12 @@ models:
|
||||||
min_value: 0
|
min_value: 0
|
||||||
strictly: false
|
strictly: false
|
||||||
|
|
||||||
- name: are_billable_bookings_projected
|
- name: are_billable_items_projected
|
||||||
data_type: boolean
|
data_type: boolean
|
||||||
description: |
|
description: |
|
||||||
Flag indicating if the billable bookings are projected or not.
|
Flag indicating if the billable items are projected or not.
|
||||||
If the month is in progress then this value corresponds to the
|
If the month is in progress then this value corresponds to the
|
||||||
projected figure. This is indicated by "are_billable_bookings_projected"
|
projected figure. This is indicated by "are_billable_items_projected"
|
||||||
flag.
|
flag.
|
||||||
data_tests:
|
data_tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,31 @@ with
|
||||||
int_kpis__agg_daily_billable_bookings as (
|
int_kpis__agg_daily_billable_bookings as (
|
||||||
select * from {{ ref("int_kpis__agg_daily_billable_bookings") }}
|
select * from {{ ref("int_kpis__agg_daily_billable_bookings") }}
|
||||||
),
|
),
|
||||||
|
int_kpis__agg_daily_api_billable_verifications as (
|
||||||
|
select * from {{ ref("int_kpis__agg_daily_api_billable_verifications") }}
|
||||||
|
),
|
||||||
|
combination_of_billable_items as (
|
||||||
|
select
|
||||||
|
coalesce(bb.date, abv.date) as date,
|
||||||
|
coalesce(bb.dimension, abv.dimension) as dimension,
|
||||||
|
coalesce(bb.dimension_value, abv.dimension_value) as dimension_value,
|
||||||
|
sum(
|
||||||
|
coalesce(bb.billable_bookings, 0)
|
||||||
|
+ coalesce(abv.billable_verifications, 0)
|
||||||
|
) as billable_items
|
||||||
|
from int_kpis__agg_daily_billable_bookings bb
|
||||||
|
full outer join
|
||||||
|
int_kpis__agg_daily_api_billable_verifications abv
|
||||||
|
on bb.date = abv.date
|
||||||
|
and bb.dimension = abv.dimension
|
||||||
|
and bb.dimension_value = abv.dimension_value
|
||||||
|
group by 1, 2, 3
|
||||||
|
),
|
||||||
same_month_trend as (
|
same_month_trend as (
|
||||||
-- Computes the daily bookings based on the same month trend.
|
-- Computes the daily billable items based on the same month trend.
|
||||||
-- If the latest available date is the 20th of the month, then the daily
|
-- If the latest available date is the 20th of the month, then the daily
|
||||||
-- bookings will be computed from the 1st to the 20th of the month (so 20 days
|
-- billable items will be computed from the 1st to the 20th of the month
|
||||||
-- in total).
|
-- (so 20 days in total).
|
||||||
select
|
select
|
||||||
dd.last_day_month,
|
dd.last_day_month,
|
||||||
mm.dimension,
|
mm.dimension,
|
||||||
|
|
@ -24,17 +44,17 @@ with
|
||||||
sum(
|
sum(
|
||||||
case
|
case
|
||||||
when dd.is_available_for_same_month_projection
|
when dd.is_available_for_same_month_projection
|
||||||
then coalesce(mm.billable_bookings, 0)
|
then coalesce(mm.billable_items, 0)
|
||||||
else 0
|
else 0
|
||||||
end
|
end
|
||||||
),
|
),
|
||||||
0
|
0
|
||||||
) as same_month_trend_total_billable_bookings,
|
) as same_month_trend_total_billable_items,
|
||||||
coalesce(
|
coalesce(
|
||||||
1.0 * sum(
|
1.0 * sum(
|
||||||
case
|
case
|
||||||
when dd.is_available_for_same_month_projection
|
when dd.is_available_for_same_month_projection
|
||||||
then coalesce(mm.billable_bookings, 0)
|
then coalesce(mm.billable_items, 0)
|
||||||
else 0
|
else 0
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
@ -49,7 +69,7 @@ with
|
||||||
0
|
0
|
||||||
),
|
),
|
||||||
0
|
0
|
||||||
) as same_month_trend_daily_billable_bookings,
|
) as same_month_trend_daily_billable_items,
|
||||||
max(
|
max(
|
||||||
case
|
case
|
||||||
when dd.is_available_for_same_month_projection
|
when dd.is_available_for_same_month_projection
|
||||||
|
|
@ -58,14 +78,14 @@ with
|
||||||
end
|
end
|
||||||
) as same_month_trend_total_available_days
|
) as same_month_trend_total_available_days
|
||||||
from int_kpis_projected__dimension_dates dd
|
from int_kpis_projected__dimension_dates dd
|
||||||
inner join int_kpis__agg_daily_billable_bookings mm on dd.date = mm.date
|
inner join combination_of_billable_items mm on dd.date = mm.date
|
||||||
group by 1, 2, 3
|
group by 1, 2, 3
|
||||||
),
|
),
|
||||||
last_7_days_trend as (
|
last_7_days_trend as (
|
||||||
-- Computes the daily bookings based on the last 7 days trend.
|
-- Computes the daily billable items based on the last 7 days trend.
|
||||||
-- If the latest available date is the 20th of the month, then the daily
|
-- If the latest available date is the 20th of the month, then the daily
|
||||||
-- bookings will be computed from the 13th to the 20th of the month (so 7 days
|
-- billable items will be computed from the 13th to the 20th of the month
|
||||||
-- in total).
|
-- (so 7 days in total).
|
||||||
select
|
select
|
||||||
dd.last_day_month,
|
dd.last_day_month,
|
||||||
mm.dimension,
|
mm.dimension,
|
||||||
|
|
@ -74,27 +94,27 @@ with
|
||||||
sum(
|
sum(
|
||||||
case
|
case
|
||||||
when dd.is_available_for_same_month_projection
|
when dd.is_available_for_same_month_projection
|
||||||
then coalesce(mm.billable_bookings, 0)
|
then coalesce(mm.billable_items, 0)
|
||||||
else 0
|
else 0
|
||||||
end
|
end
|
||||||
),
|
),
|
||||||
0
|
0
|
||||||
) as last_7_days_trend_total_billable_bookings,
|
) as last_7_days_trend_total_billable_items,
|
||||||
coalesce(
|
coalesce(
|
||||||
1.0 * sum(
|
1.0 * sum(
|
||||||
case
|
case
|
||||||
when dd.is_available_for_same_month_projection
|
when dd.is_available_for_same_month_projection
|
||||||
then coalesce(mm.billable_bookings, 0)
|
then coalesce(mm.billable_items, 0)
|
||||||
else 0
|
else 0
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
/ 7,
|
/ 7,
|
||||||
0
|
0
|
||||||
) as last_7_days_trend_daily_billable_bookings,
|
) as last_7_days_trend_daily_billable_items,
|
||||||
7 as last_7_days_trend_total_available_days
|
7 as last_7_days_trend_total_available_days
|
||||||
from int_kpis_projected__dimension_dates dd
|
from int_kpis_projected__dimension_dates dd
|
||||||
inner join
|
inner join
|
||||||
int_kpis__agg_daily_billable_bookings mm
|
combination_of_billable_items mm
|
||||||
on mm.date between dd.previous_6_days and dd.date
|
on mm.date between dd.previous_6_days and dd.date
|
||||||
where is_available_for_last_7_days_projection = true
|
where is_available_for_last_7_days_projection = true
|
||||||
group by 1, 2, 3
|
group by 1, 2, 3
|
||||||
|
|
@ -107,24 +127,24 @@ with
|
||||||
|
|
||||||
-- Combination of two sources of trends: same month and last 7 days.
|
-- Combination of two sources of trends: same month and last 7 days.
|
||||||
coalesce(
|
coalesce(
|
||||||
smt.same_month_trend_daily_billable_bookings, 0
|
smt.same_month_trend_daily_billable_items, 0
|
||||||
) as same_month_trend_daily_billable_bookings,
|
) as same_month_trend_daily_billable_items,
|
||||||
coalesce(
|
coalesce(
|
||||||
l7dt.last_7_days_trend_daily_billable_bookings, 0
|
l7dt.last_7_days_trend_daily_billable_items, 0
|
||||||
) as last_7_days_trend_daily_billable_bookings,
|
) as last_7_days_trend_daily_billable_items,
|
||||||
round(
|
round(
|
||||||
(
|
(
|
||||||
coalesce(smt.same_month_trend_daily_billable_bookings, 0)
|
coalesce(smt.same_month_trend_daily_billable_items, 0)
|
||||||
+ coalesce(l7dt.last_7_days_trend_daily_billable_bookings, 0)
|
+ coalesce(l7dt.last_7_days_trend_daily_billable_items, 0)
|
||||||
)
|
)
|
||||||
/ 2,
|
/ 2,
|
||||||
0
|
0
|
||||||
) as projected_daily_billable_bookings,
|
) as projected_daily_billable_items,
|
||||||
|
|
||||||
-- Total billable bookings for the same month and last 7 days
|
-- Total billable items for the same month and last 7 days
|
||||||
-- for information purposes
|
-- for information purposes
|
||||||
smt.same_month_trend_total_billable_bookings,
|
smt.same_month_trend_total_billable_items,
|
||||||
l7dt.last_7_days_trend_total_billable_bookings,
|
l7dt.last_7_days_trend_total_billable_items,
|
||||||
|
|
||||||
-- Total available days for the same month and last 7 days
|
-- Total available days for the same month and last 7 days
|
||||||
-- for information purposes
|
-- for information purposes
|
||||||
|
|
@ -156,12 +176,12 @@ select
|
||||||
-- future. This accounts for all the real historical data.
|
-- future. This accounts for all the real historical data.
|
||||||
case
|
case
|
||||||
when not dd.is_in_the_future then 'ACTUAL' else 'PROJECTED'
|
when not dd.is_in_the_future then 'ACTUAL' else 'PROJECTED'
|
||||||
end as daily_billable_bookings_for_reporting_source,
|
end as daily_billable_items_for_reporting_source,
|
||||||
case
|
case
|
||||||
when not dd.is_in_the_future
|
when not dd.is_in_the_future
|
||||||
then coalesce(mm.billable_bookings, 0)
|
then coalesce(mm.billable_items, 0)
|
||||||
else coalesce(cot.projected_daily_billable_bookings, 0)
|
else coalesce(cot.projected_daily_billable_items, 0)
|
||||||
end as daily_billable_bookings_for_reporting,
|
end as daily_billable_items_for_reporting,
|
||||||
|
|
||||||
-- Evaluation source: actual or projected depending on whether the date is
|
-- Evaluation source: actual or projected depending on whether the date is
|
||||||
-- available for the same month projection. This accounts only for the historical
|
-- available for the same month projection. This accounts only for the historical
|
||||||
|
|
@ -169,31 +189,29 @@ select
|
||||||
-- the performance of the projection.
|
-- the performance of the projection.
|
||||||
case
|
case
|
||||||
when dd.is_available_for_same_month_projection then 'ACTUAL' else 'PROJECTED'
|
when dd.is_available_for_same_month_projection then 'ACTUAL' else 'PROJECTED'
|
||||||
end as daily_billable_bookings_for_evaluation_source,
|
end as daily_billable_items_for_evaluation_source,
|
||||||
case
|
case
|
||||||
when dd.is_available_for_same_month_projection
|
when dd.is_available_for_same_month_projection
|
||||||
then coalesce(mm.billable_bookings, 0)
|
then coalesce(mm.billable_items, 0)
|
||||||
else coalesce(cot.projected_daily_billable_bookings, 0)
|
else coalesce(cot.projected_daily_billable_items, 0)
|
||||||
end as daily_billable_bookings_for_evaluation,
|
end as daily_billable_items_for_evaluation,
|
||||||
|
|
||||||
-- Specific daily billable bookings trends
|
-- Specific daily billable items trends
|
||||||
coalesce(
|
coalesce(cot.projected_daily_billable_items, 0) as projected_daily_billable_items,
|
||||||
cot.projected_daily_billable_bookings, 0
|
coalesce(mm.billable_items, 0) as actual_daily_billable_items,
|
||||||
) as projected_daily_billable_bookings,
|
|
||||||
coalesce(mm.billable_bookings, 0) as actual_daily_billable_bookings,
|
|
||||||
|
|
||||||
-- For information purposes to debug the trends
|
-- For information purposes to debug the trends
|
||||||
cot.same_month_trend_daily_billable_bookings,
|
cot.same_month_trend_daily_billable_items,
|
||||||
cot.last_7_days_trend_daily_billable_bookings,
|
cot.last_7_days_trend_daily_billable_items,
|
||||||
cot.same_month_trend_total_billable_bookings,
|
cot.same_month_trend_total_billable_items,
|
||||||
cot.last_7_days_trend_total_billable_bookings,
|
cot.last_7_days_trend_total_billable_items,
|
||||||
cot.same_month_trend_total_available_days,
|
cot.same_month_trend_total_available_days,
|
||||||
cot.last_7_days_trend_total_available_days
|
cot.last_7_days_trend_total_available_days
|
||||||
|
|
||||||
from int_kpis_projected__dimension_dates dd
|
from int_kpis_projected__dimension_dates dd
|
||||||
left join combination_of_trends cot on dd.last_day_month = cot.last_day_month
|
left join combination_of_trends cot on dd.last_day_month = cot.last_day_month
|
||||||
left join
|
left join
|
||||||
int_kpis__agg_daily_billable_bookings mm
|
combination_of_billable_items mm
|
||||||
on dd.date = mm.date
|
on dd.date = mm.date
|
||||||
and cot.dimension = mm.dimension
|
and cot.dimension = mm.dimension
|
||||||
and cot.dimension_value = mm.dimension_value
|
and cot.dimension_value = mm.dimension_value
|
||||||
|
|
@ -15,14 +15,14 @@ with
|
||||||
|
|
||||||
-- Metrics --
|
-- Metrics --
|
||||||
sum(
|
sum(
|
||||||
daily_billable_bookings_for_reporting
|
daily_billable_items_for_reporting
|
||||||
) as current_month_projected_billable_bookings,
|
) as current_month_projected_billable_items,
|
||||||
sum(
|
sum(
|
||||||
daily_billable_bookings_for_evaluation
|
daily_billable_items_for_evaluation
|
||||||
) as historical_projected_billable_bookings,
|
) as historical_projected_billable_items,
|
||||||
sum(actual_daily_billable_bookings) as actual_billable_bookings
|
sum(actual_daily_billable_items) as actual_billable_items
|
||||||
|
|
||||||
from {{ ref("int_kpis_projected__agg_daily_billable_bookings") }}
|
from {{ ref("int_kpis_projected__agg_daily_billable_items") }}
|
||||||
group by 1, 2, 3, 4, 5
|
group by 1, 2, 3, 4, 5
|
||||||
),
|
),
|
||||||
monthly_error_computation as (
|
monthly_error_computation as (
|
||||||
|
|
@ -31,26 +31,20 @@ with
|
||||||
last_day_month,
|
last_day_month,
|
||||||
dimension,
|
dimension,
|
||||||
dimension_value,
|
dimension_value,
|
||||||
current_month_projected_billable_bookings,
|
current_month_projected_billable_items,
|
||||||
historical_projected_billable_bookings,
|
historical_projected_billable_items,
|
||||||
actual_billable_bookings,
|
actual_billable_items,
|
||||||
case
|
case
|
||||||
when not is_current_month
|
when not is_current_month
|
||||||
then
|
then abs(historical_projected_billable_items - actual_billable_items)
|
||||||
abs(
|
|
||||||
historical_projected_billable_bookings
|
|
||||||
- actual_billable_bookings
|
|
||||||
)
|
|
||||||
else null
|
else null
|
||||||
end as monthly_absolute_error,
|
end as monthly_absolute_error,
|
||||||
case
|
case
|
||||||
when not is_current_month
|
when not is_current_month
|
||||||
then
|
then
|
||||||
1.0 * abs(
|
1.0
|
||||||
historical_projected_billable_bookings
|
* abs(historical_projected_billable_items - actual_billable_items)
|
||||||
- actual_billable_bookings
|
/ nullif(historical_projected_billable_items, 0)
|
||||||
)
|
|
||||||
/ nullif(historical_projected_billable_bookings, 0)
|
|
||||||
else null
|
else null
|
||||||
end as monthly_absolute_percentage_error
|
end as monthly_absolute_percentage_error
|
||||||
|
|
||||||
|
|
@ -77,8 +71,8 @@ select
|
||||||
current_month.dimension,
|
current_month.dimension,
|
||||||
current_month.dimension_value,
|
current_month.dimension_value,
|
||||||
-- Metrics --
|
-- Metrics --
|
||||||
current_month.current_month_projected_billable_bookings,
|
current_month.current_month_projected_billable_items,
|
||||||
current_month.actual_billable_bookings,
|
current_month.actual_billable_items,
|
||||||
-- Error Attribution --
|
-- Error Attribution --
|
||||||
historical_errors.historical_monthly_mean_absolute_error,
|
historical_errors.historical_monthly_mean_absolute_error,
|
||||||
historical_errors.historical_monthly_mean_absolute_percentage_error
|
historical_errors.historical_monthly_mean_absolute_percentage_error
|
||||||
|
|
@ -100,15 +100,17 @@ models:
|
||||||
data_tests:
|
data_tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|
||||||
- name: int_kpis_projected__agg_daily_billable_bookings
|
- name: int_kpis_projected__agg_daily_billable_items
|
||||||
description: |
|
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:
|
It considers 2 computations:
|
||||||
- The daily billable bookings for the current month,
|
- The daily billable items for the current month,
|
||||||
- The daily billable bookings in the past 7 days,
|
- The daily billable items in the past 7 days,
|
||||||
and the final value is an arithmetic mean of both.
|
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.
|
to compare the projected values with the actual ones.
|
||||||
|
|
||||||
data_tests:
|
data_tests:
|
||||||
|
|
@ -131,15 +133,13 @@ models:
|
||||||
data_type: string
|
data_type: string
|
||||||
description: The dimension or granularity of the metrics.
|
description: The dimension or granularity of the metrics.
|
||||||
data_tests:
|
data_tests:
|
||||||
- assert_dimension_completeness:
|
|
||||||
metric_column_names:
|
|
||||||
- actual_daily_billable_bookings
|
|
||||||
- accepted_values:
|
- accepted_values:
|
||||||
values:
|
values:
|
||||||
- global
|
- global
|
||||||
- by_number_of_listings
|
- by_number_of_listings
|
||||||
- by_billing_country
|
- by_billing_country
|
||||||
- by_business_scope
|
- by_business_scope
|
||||||
|
- by_service
|
||||||
- by_deal
|
- by_deal
|
||||||
|
|
||||||
- name: dimension_value
|
- name: dimension_value
|
||||||
|
|
@ -193,12 +193,12 @@ models:
|
||||||
data_tests:
|
data_tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|
||||||
- name: daily_billable_bookings_for_reporting_source
|
- name: daily_billable_items_for_reporting_source
|
||||||
data_type: string
|
data_type: string
|
||||||
description: |
|
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
|
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.
|
the actual and projected values.
|
||||||
It's aimed for reforting purposes as any historical month will
|
It's aimed for reforting purposes as any historical month will
|
||||||
contain the actual figures.
|
contain the actual figures.
|
||||||
|
|
@ -209,25 +209,25 @@ models:
|
||||||
- ACTUAL
|
- ACTUAL
|
||||||
- PROJECTED
|
- PROJECTED
|
||||||
|
|
||||||
- name: daily_billable_bookings_for_reporting
|
- name: daily_billable_items_for_reporting
|
||||||
data_type: integer
|
data_type: integer
|
||||||
description: |
|
description: |
|
||||||
The daily billable bookings for reporting purposes.
|
The daily billable items for reporting purposes.
|
||||||
This field contains both the actual and projected values.
|
This field contains both the actual and projected values.
|
||||||
Any date in the future will contain projected values, while
|
Any date in the future will contain projected values, while
|
||||||
any date in the past will contain actual values.
|
any date in the past will contain actual values.
|
||||||
data_tests:
|
data_tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|
||||||
- name: daily_billable_bookings_for_evaluation_source
|
- name: daily_billable_items_for_evaluation_source
|
||||||
data_type: string
|
data_type: string
|
||||||
description: |
|
description: |
|
||||||
Important: This field is used to evaluate the performance
|
Important: This field is used to evaluate the performance
|
||||||
of the projections!
|
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
|
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.
|
the actual and projected values.
|
||||||
It's aimed for evaluation purposes as any historical month can
|
It's aimed for evaluation purposes as any historical month can
|
||||||
contain projected figures.
|
contain projected figures.
|
||||||
|
|
@ -239,13 +239,13 @@ models:
|
||||||
- ACTUAL
|
- ACTUAL
|
||||||
- PROJECTED
|
- PROJECTED
|
||||||
|
|
||||||
- name: daily_billable_bookings_for_evaluation
|
- name: daily_billable_items_for_evaluation
|
||||||
data_type: integer
|
data_type: integer
|
||||||
description: |
|
description: |
|
||||||
Important: This field is used to evaluate the performance
|
Important: This field is used to evaluate the performance
|
||||||
of the projections!
|
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.
|
This field contains both the actual and projected values.
|
||||||
Any date in the future will contain projected values. Any date
|
Any date in the future will contain projected values. Any date
|
||||||
in the past which day is after the yesterday day will also contain
|
in the past which day is after the yesterday day will also contain
|
||||||
|
|
@ -254,57 +254,57 @@ models:
|
||||||
data_tests:
|
data_tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|
||||||
- name: projected_daily_billable_bookings
|
- name: projected_daily_billable_items
|
||||||
data_type: integer
|
data_type: integer
|
||||||
description: |
|
description: |
|
||||||
The projected daily billable bookings. This field is the result
|
The projected daily billable items. This field is the result
|
||||||
of the projection of the daily billable bookings for the current month
|
of the projection of the daily billable items for the current month
|
||||||
and the past 7 days.
|
and the past 7 days.
|
||||||
data_tests:
|
data_tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|
||||||
- name: actual_daily_billable_bookings
|
- name: actual_daily_billable_items
|
||||||
description: |
|
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.
|
This comes from the standard KPIs.
|
||||||
data_tests:
|
data_tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|
||||||
- name: same_month_trend_daily_billable_bookings
|
- name: same_month_trend_daily_billable_items
|
||||||
data_type: float
|
data_type: float
|
||||||
description: |
|
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
|
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.
|
to date, and contains decimals.
|
||||||
This is just for information purposes.
|
This is just for information purposes.
|
||||||
data_tests:
|
data_tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|
||||||
- name: last_7_days_trend_daily_billable_bookings
|
- name: last_7_days_trend_daily_billable_items
|
||||||
data_type: float
|
data_type: float
|
||||||
description: |
|
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
|
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.
|
This is just for information purposes.
|
||||||
data_tests:
|
data_tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|
||||||
- name: same_month_trend_total_billable_bookings
|
- name: same_month_trend_total_billable_items
|
||||||
data_type: integer
|
data_type: integer
|
||||||
description: |
|
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
|
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.
|
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
|
data_type: integer
|
||||||
description: |
|
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
|
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.
|
This is just for information purposes.
|
||||||
|
|
||||||
- name: same_month_trend_total_available_days
|
- name: same_month_trend_total_available_days
|
||||||
|
|
@ -323,10 +323,12 @@ models:
|
||||||
past 7 days.
|
past 7 days.
|
||||||
This is just for information purposes.
|
This is just for information purposes.
|
||||||
|
|
||||||
- name: int_kpis_projected__agg_monthly_billable_bookings
|
- name: int_kpis_projected__agg_monthly_billable_items
|
||||||
description: |
|
description: |
|
||||||
This model provides the projected monthly billable bookings per dimension
|
This model provides the projected monthly billable items per dimension
|
||||||
and dimension value. It only considers the current month.
|
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
|
Historical data is considered only to assess the performance of the
|
||||||
projections.
|
projections.
|
||||||
The projection logic is handled on the equivalent daily model,
|
The projection logic is handled on the equivalent daily model,
|
||||||
|
|
@ -357,15 +359,13 @@ models:
|
||||||
data_type: string
|
data_type: string
|
||||||
description: The dimension or granularity of the metrics.
|
description: The dimension or granularity of the metrics.
|
||||||
data_tests:
|
data_tests:
|
||||||
- assert_dimension_completeness:
|
|
||||||
metric_column_names:
|
|
||||||
- actual_billable_bookings
|
|
||||||
- accepted_values:
|
- accepted_values:
|
||||||
values:
|
values:
|
||||||
- global
|
- global
|
||||||
- by_number_of_listings
|
- by_number_of_listings
|
||||||
- by_billing_country
|
- by_billing_country
|
||||||
- by_business_scope
|
- by_business_scope
|
||||||
|
- by_service
|
||||||
- by_deal
|
- by_deal
|
||||||
|
|
||||||
- name: dimension_value
|
- name: dimension_value
|
||||||
|
|
@ -374,12 +374,12 @@ models:
|
||||||
data_tests:
|
data_tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|
||||||
- name: current_month_projected_billable_bookings
|
- name: current_month_projected_billable_items
|
||||||
data_type: integer
|
data_type: integer
|
||||||
description: |
|
description: |
|
||||||
The projected monthly billable bookings for the current month.
|
The projected monthly billable items for the current month.
|
||||||
This field is the result of the sum of the actual daily billable bookings
|
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 bookings
|
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.
|
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.
|
The closest we are to the end of the month, the more accurate this value will be.
|
||||||
|
|
@ -391,10 +391,10 @@ models:
|
||||||
data_tests:
|
data_tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|
||||||
- name: actual_billable_bookings
|
- name: actual_billable_items
|
||||||
data_type: integer
|
data_type: integer
|
||||||
description: |
|
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.
|
This comes from the standard KPIs.
|
||||||
data_tests:
|
data_tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|
@ -407,7 +407,7 @@ models:
|
||||||
This field is used to assess the performance of the projections.
|
This field is used to assess the performance of the projections.
|
||||||
|
|
||||||
This is based on the absolute differences between the projected
|
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
|
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
|
for the current month to date as the actual value, and the rest of the days
|
||||||
are projected.
|
are projected.
|
||||||
|
|
@ -425,7 +425,7 @@ models:
|
||||||
This field is used to assess the performance of the projections.
|
This field is used to assess the performance of the projections.
|
||||||
|
|
||||||
This is based on the absolute percentage differences between the projected
|
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
|
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
|
for the current month to date as the actual value, and the rest of the days
|
||||||
are projected.
|
are projected.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue