commit wip

This commit is contained in:
Joaquin 2025-03-13 11:33:15 +01:00
parent bf1e125856
commit 1ced79ca0a
2 changed files with 9 additions and 17 deletions

View file

@ -44,18 +44,14 @@ with
case
when upper(hd.deal_pipeline) in ('API SALES') then 'API' else 'PLATFORM'
end as client_type,
min(
coalesce(hd.deal_start_date, cd.deal_start_date)
) as effective_deal_start_date_utc,
min(
coalesce(hd.deal_start_month, cd.deal_start_month)
) as effective_deal_start_month,
hd.deal_start_date as effective_deal_start_date_utc,
hd.deal_start_month as effective_deal_start_month,
min(hd.deal_cancellation_date) as hubspot_deal_cancellation_date_utc,
min(hd.deal_cancellation_month) as hubspot_deal_cancellation_month,
min(hd.hubspot_listing_segmentation) as hubspot_listing_segmentation
from hubspot_deals hd
full outer join core_deals cd on hd.id_deal = cd.id_deal
group by 1, 2, 3, 4, 5, 6
group by 1, 2, 3, 4, 5, 6, 7, 8
)
select
cd.id_deal,

View file

@ -479,19 +479,15 @@ models:
- name: effective_deal_start_date_utc
data_type: date
description: |
Effective start date of the deal, which corresponds to the minimum between the
date a deal has gone live according to Hubspot and the first date a user
host has been created according to Core.
data_tests:
- not_null
Effective start date of the deal, this corresponds to the date a deal has
gone live according to Hubspot.
It can be Null if the deal doesn't appear in HubSpot.
- name: effective_deal_start_month
data_type: date
description: |
This field represents the first day of the month of the effective
start date of the deal. This is obtained by truncating the effective
deal start date to the month.
data_tests:
- not_null
This field represents the first day of the month of the effective deal
start date. This is obtained by truncating the effective deal start date
to the month.
- name: hubspot_deal_cancellation_date_utc
data_type: date
description: |