Merged PR 4413: Fixes on Business Scope

# Description

Changes:
* Fixes listings by properly considering the equal or higher sign. I'm very dumb
* Fixes exclusion of new dash billable bookings by properly applying in both monthly and mtd. I'm very dumb x2

# 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: #27356
This commit is contained in:
Oriol Roqué Paniagua 2025-02-14 16:17:41 +00:00
parent be0b8c41b6
commit 4fc0ea71c6
2 changed files with 4 additions and 2 deletions

View file

@ -36,6 +36,8 @@ with
where
dimension in ('global', 'by_number_of_listings', 'by_billing_country', 'by_business_scope')
and dimension_value <> 'UNSET'
-- TEMPORARY EXCLUDE NEW DASH BILLABLE BOOKINGS
and dimension_value <> 'New Dash'
union all
select *
from {{ ref("int_kpis__agg_monthly_billable_bookings") }}

View file

@ -13,7 +13,7 @@ select
when
icuh.is_user_in_new_dash = true
and icuh.is_missing_id_deal = false
and icuh.user_in_new_dash_since_date_utc >= lda.date
and lda.date >= icuh.user_in_new_dash_since_date_utc
then 'New Dash'
-- Old Dash users if user is not in the new dash or before move date
when
@ -21,7 +21,7 @@ select
or (
icuh.is_user_in_new_dash = true
and icuh.is_missing_id_deal = false
and not icuh.user_in_new_dash_since_date_utc >= lda.date
and not lda.date >= icuh.user_in_new_dash_since_date_utc
)
then 'Old Dash'
-- Rest of the cases, includes KYG Lite users