Addressed comments

This commit is contained in:
Joaquin Ossa 2025-01-29 15:44:07 +01:00
parent a48f6d0f59
commit 63b1eac81f
3 changed files with 12 additions and 9 deletions

View file

@ -2,6 +2,7 @@ with
int_monthly_aggregated_metrics_history_by_deal as (
select * from {{ ref("int_monthly_aggregated_metrics_history_by_deal") }}
),
int_kpis__dimension_deals as (select * from {{ ref("int_kpis__dimension_deals") }}),
deal_attributes as (
select
id_deal,
@ -13,7 +14,7 @@ with
coalesce(
hubspot_listing_segmentation, 'UNSET'
) as hubspot_listing_segmentation
from {{ ref("int_kpis__dimension_deals") }}
from int_kpis__dimension_deals
-- Exclude deals without live dates
where effective_deal_start_date_utc is not null
)

View file

@ -1754,9 +1754,13 @@ models:
- name: int_mtd_agg_onboarding_mrr_revenue
description: |
This model contains the month-to-date aggregated metrics for the onboarding MRR.
It includes the expected MRR per deal and the total expected MRR, which is obtained
by summing the expected MRRs for all new deals.
This model contains the month-to-date aggregated metrics for onboarding MRR.
It includes the total expected MRR revenue for the month, aggregated by
dimension for 'global' and 'by_number_of_listings' only.
- The 'by_number_of_listings' dimension is calculated by multiplying the
expected MRR per deal by the number of new deals in that segment.
- The 'global' dimension represents the sum of all expected MRRs across
all segments.
data_tests:
- dbt_utils.unique_combination_of_columns:
@ -1780,7 +1784,6 @@ models:
values:
- global
- by_number_of_listings
- by_billing_country
- name: dimension_value
data_type: string

View file

@ -34,7 +34,6 @@ with
) as previous_booked_date
from int_core__bookings icb
inner join int_core__user_host icuh on icb.id_user_host = icuh.id_user_host
inner join int_hubspot__deal hd on icuh.id_deal = hd.id_deal
where icuh.id_deal is not null
group by icuh.id_deal, icb.created_date_utc
),
@ -42,12 +41,12 @@ with
select
coalesce(hd.id_deal, h.id_deal) as id_deal,
min(coalesce(hd.live_date_utc, h.created_date_utc)) as created_date_utc
from intermediate.int_hubspot__deal hd
from int_hubspot__deal hd
full outer join
intermediate.int_core__user_host h
int_core__user_host h
on hd.id_deal = h.id_deal
and h.id_deal is not null
where hd.id_deal is not null
and h.id_deal is not null
group by 1
),
deal_historic_booking_dates as (