Merged PR 5044: Switch Projected Created Bookings to Billable Bookings

# Description

Switches Created Bookings to Billable Bookings in the scope of Projected Bookings. I opted for hard switching (thus removing Projected Created Bookings) altogether to avoid having unused models in production.

This aims to set the ground to include, in the future, APIs Billable Bookings.

Impact in KPIs:
* `int_kpis__agg_daily_created_bookings` now is `int_kpis__agg_daily_billable_bookings`. Aside from the name change, it's reduced to 4 metrics to just one. Schema changes also apply.

Impact in Projected KPIs:
* `int_kpis_projected__agg_daily_created_bookings` now is `int_kpis_projected__agg_daily_billable_bookings`. Fields are also renamed accordingly.
* `int_kpis_projected__agg_monthly_created_bookings` now is `int_kpis_projected__agg_monthly_billable_bookings`. Fields are also renamed accordingly.
* Schema file is also updated accordingly.

Impact on new model for Growth Score:
* `int_created_bookings_growth_score_by_deal` now is `int_billable_bookings_growth_score_by_deal`. Fields are also renamed accordingly.
* Schema is also updated accordingly.

Note that since the end model `int_billable_bookings_growth_score_by_deal` is not used at the moment in reporting, there's no user-facing impact. Also, the rest of modified models are not used for other purposes.

# 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:
Oriol Roqué Paniagua 2025-04-24 12:42:21 +00:00
parent ca2311d935
commit 653666abad
9 changed files with 269 additions and 284 deletions

View file

@ -844,10 +844,10 @@ models:
Count of accumulated bookings created in a given month up to the
given date and per specified dimension that have not been cancelled.
- name: int_kpis__agg_daily_created_bookings
- name: int_kpis__agg_daily_billable_bookings
description: |
This model computes the dimension aggregation for
Daily Created Bookings.
Daily Billable Bookings.
The primary key of this model is end_date, dimension
and dimension_value.
@ -874,9 +874,7 @@ models:
data_tests:
- assert_dimension_completeness:
metric_column_names:
- created_bookings
- cancelled_created_bookings
- not_cancelled_created_bookings
- billable_bookings
- accepted_values:
values:
- global
@ -891,24 +889,9 @@ models:
data_tests:
- not_null
- name: created_bookings
- name: billable_bookings
data_type: bigint
description: The daily created bookings for a given date, dimension and value.
- name: cancelled_created_bookings
data_type: bigint
description: |
The daily cancelled created bookings for a given date, dimension and value.
- name: not_cancelled_created_bookings
data_type: bigint
description: |
The daily not cancelled created bookings for a given date, dimension and value.
- name: cancelled_created_bookings_rate
data_type: decimal
description: |
The daily rate of cancelled created bookings for a given date, dimension and value.
description: The daily billable bookings for a given date, dimension and value.
- name: int_kpis__agg_monthly_created_bookings
description: |