Merged PR 5353: Switch int_core__booking_summary to int_booking_summary

# Description

This PR does the following:
* Moves `core/int_core__booking_summary` to `cross/int_core__booking_summary`
* Renames the model `cross/int_core__booking_summary` to `cross/int_booking_summary`
* Same for schema entry. In the new schema, I just added in the description how to retrieve exclusively New Dash Bookings for usability purposes.

Then, it adapts any dependency on `int_core__booking_summary` to `int_booking_summary`

No additional changes - inclusion of Resolution Incidents data will come later in a different PR.

# 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: #30676
This commit is contained in:
Oriol Roqué Paniagua 2025-05-30 12:51:10 +00:00
parent a9a1e68624
commit d33e5ff2b2
17 changed files with 399 additions and 393 deletions

View file

@ -23,7 +23,7 @@ left join
on icuh.id_deal = icmas.id_deal
and icb.booking_fee_charge_date_utc = icmas.date
left join
{{ ref("int_core__booking_summary") }} as icbs on icb.id_booking = icbs.id_booking
{{ ref("int_booking_summary") }} as icbs on icb.id_booking = icbs.id_booking
where
icb.is_duplicate_booking = false
and icb.booking_fee_charge_date_utc is not null
@ -48,7 +48,7 @@ select
) as active_accommodations_per_deal_segmentation,
-- Metrics --
count(distinct icbs.id_booking) as billable_bookings
from {{ ref("int_core__booking_summary") }} icbs
from {{ ref("int_booking_summary") }} icbs
left join {{ ref("int_core__deal") }} as icd on icbs.id_deal = icd.id_deal
left join
{{ ref("int_kpis__dimension_daily_accommodation") }} as icmas

View file

@ -67,6 +67,6 @@ left join
on icuh.id_deal = icmas.id_deal
and icb.check_out_date_utc = icmas.date
left join
{{ ref("int_core__booking_summary") }} as icbs on icb.id_booking = icbs.id_booking
{{ ref("int_booking_summary") }} as icbs on icb.id_booking = icbs.id_booking
where icb.is_duplicate_booking = false
group by 1, 2, 3, 4, 5

View file

@ -34,7 +34,7 @@ left join
on icuh.id_deal = icmas.id_deal
and icvr.verification_estimated_completed_date_utc = icmas.date
left join
{{ ref("int_core__booking_summary") }} as icbs
{{ ref("int_booking_summary") }} as icbs
on icvr.id_verification_request = icbs.id_verification_request
where icvr.verification_estimated_completed_date_utc is not null
group by 1, 2, 3, 4, 5

View file

@ -48,6 +48,6 @@ left join
on icuh.id_deal = icmas.id_deal
and icb.created_date_utc = icmas.date
left join
{{ ref("int_core__booking_summary") }} as icbs on icb.id_booking = icbs.id_booking
{{ ref("int_booking_summary") }} as icbs on icb.id_booking = icbs.id_booking
where icb.is_duplicate_booking = false
group by 1, 2, 3, 4, 5

View file

@ -34,6 +34,6 @@ left join
on icuh.id_deal = icmas.id_deal
and icvr.created_date_utc = icmas.date
left join
{{ ref("int_core__booking_summary") }} as icbs
{{ ref("int_booking_summary") }} as icbs
on icvr.id_verification_request = icbs.id_verification_request
group by 1, 2, 3, 4, 5

View file

@ -43,6 +43,6 @@ left join
on icuh.id_deal = icmas.id_deal
and p.first_payment_paid_date_utc = icmas.date
left join
{{ ref("int_core__booking_summary") }} as icbs
{{ ref("int_booking_summary") }} as icbs
on p.id_verification_request = icbs.id_verification_request
group by 1, 2, 3, 4, 5

View file

@ -91,7 +91,7 @@ left join
on icuh.id_deal = icmas.id_deal
and icgjp.payment_paid_date_utc = icmas.date
left join
{{ ref("int_core__booking_summary") }} as icbs
{{ ref("int_booking_summary") }} as icbs
on icgjp.id_verification_request = icbs.id_verification_request
where icgjp.is_paid_status = true
group by 1, 2, 3, 4, 5, 6

View file

@ -24,7 +24,7 @@ select
-- Metrics --
count(distinct icbsd.id_booking_service_detail) as chargeable_services,
sum(icbsd.service_total_price_in_gbp) as service_total_price_in_gbp
from {{ ref("int_core__booking_summary") }} as icbs
from {{ ref("int_booking_summary") }} as icbs
inner join
{{ ref("int_core__booking_service_detail") }} as icbsd
on icbs.id_booking = icbsd.id_booking

View file

@ -27,7 +27,7 @@ select
coalesce(
icmas.active_accommodations_per_deal_segmentation, 'UNSET'
) as active_accommodations_per_deal_segmentation
from {{ ref("int_core__booking_summary") }} as bs
from {{ ref("int_booking_summary") }} as bs
inner join
{{ ref("int_core__booking_service_detail") }} as icbsd
on bs.id_booking = icbsd.id_booking

View file

@ -22,7 +22,7 @@ select
) as active_accommodations_per_deal_segmentation,
-- Metrics --
count(distinct icbsd.id_booking_service_detail) as created_services
from {{ ref("int_core__booking_summary") }} as icbs
from {{ ref("int_booking_summary") }} as icbs
inner join
{{ ref("int_core__booking_service_detail") }} as icbsd
on icbs.id_booking = icbsd.id_booking

View file

@ -34,7 +34,7 @@ left join
on icuh.id_deal = icmas.id_deal
and icvr.verification_estimated_started_date_utc = icmas.date
left join
{{ ref("int_core__booking_summary") }} as icbs
{{ ref("int_booking_summary") }} as icbs
on icvr.id_verification_request = icbs.id_verification_request
where icvr.verification_estimated_started_date_utc is not null
group by 1, 2, 3, 4, 5