Update name of fields

This commit is contained in:
Joaquin Ossa 2025-01-09 16:31:22 +01:00
parent bd25b473fb
commit 0c311d02e8
7 changed files with 32 additions and 30 deletions

View file

@ -85,8 +85,8 @@ select
-- DEAL STATIC ATTRIBUTES --
ikdd.id_deal,
ikdd.main_deal_name,
ikdd.active_pms,
ikdd.pms,
ikdd.has_active_pms,
ikdd.active_pms_list,
ikdd.main_billing_country_iso_3_per_deal,
-- DEAL LIFECYCLE --

View file

@ -9,8 +9,8 @@ with
date,
id_deal,
main_deal_name,
active_pms,
pms,
has_active_pms,
active_pms_list,
main_billing_country_iso_3_per_deal,
deal_lifecycle_state,
'All History' as time_window,
@ -122,8 +122,8 @@ with
date,
id_deal,
main_deal_name,
active_pms,
pms,
has_active_pms,
active_pms_list,
main_billing_country_iso_3_per_deal,
deal_lifecycle_state,
'Previous 12 months' as time_window,
@ -220,8 +220,8 @@ with
date,
id_deal,
main_deal_name,
active_pms,
pms,
has_active_pms,
active_pms_list,
main_billing_country_iso_3_per_deal,
deal_lifecycle_state,
'Previous 6 months' as time_window,
@ -318,8 +318,8 @@ with
date,
id_deal,
main_deal_name,
active_pms,
pms,
has_active_pms,
active_pms_list,
main_billing_country_iso_3_per_deal,
deal_lifecycle_state,
'Previous 3 months' as time_window,
@ -416,8 +416,8 @@ with
date,
id_deal,
main_deal_name,
active_pms,
pms,
has_active_pms,
active_pms_list,
main_billing_country_iso_3_per_deal,
deal_lifecycle_state,
'Previous month' as time_window,
@ -537,8 +537,8 @@ select
-- Deal attributes
mabd.main_deal_name,
mabd.active_pms,
mabd.pms,
mabd.has_active_pms,
mabd.active_pms_list,
mabd.main_billing_country_iso_3_per_deal,
mabd.deal_lifecycle_state,
d.deal_hubspot_stage,

View file

@ -359,18 +359,18 @@ models:
tests:
- not_null
- name: active_pms
- name: has_active_pms
data_type: boolean
description: |
Does the deal have an active associated PMS.
tests:
- not_null
- name: pms
- name: active_pms_list
data_type: string
description: |
Name of the active PMS associated with the deal. It can have more than
one PMS associated with it. It can be null doesn't have any PMS associated.
one PMS associated with it. It can be null if it doesn't have any PMS associated.
- name: main_billing_country_iso_3_per_deal
data_type: string
@ -1480,18 +1480,18 @@ models:
tests:
- not_null
- name: active_pms
- name: has_active_pms
data_type: boolean
description: |
Does the deal have an active associated PMS.
tests:
- not_null
- name: pms
- name: active_pms_list
data_type: string
description: |
Name of the active PMS associated with the deal. It can have more than
one PMS associated with it. It can be null doesn't have any PMS associated.
one PMS associated with it. It can be null if it doesn't have any PMS associated.
- name: main_billing_country_iso_3_per_deal
data_type: string

View file

@ -47,8 +47,10 @@ with
select
cd.id_deal,
cd.main_deal_name,
case when ipd.distinct_active_pms is null then false else true end as active_pms,
ipd.distinct_active_pms as pms,
case
when ipd.distinct_active_pms is null then false else true
end as has_active_pms,
ipd.distinct_active_pms as active_pms_list,
cd.main_billing_country_iso_3_per_deal,
cd.effective_deal_start_date_utc
from combined_deals cd

View file

@ -450,17 +450,17 @@ models:
in both systems, Hubspot data will take precedence in terms of deal name.
tests:
- not_null
- name: active_pms
- name: has_active_pms
data_type: boolean
description: |
Does the deal have an active associated PMS.
tests:
- not_null
- name: pms
- name: active_pms_list
data_type: string
description: |
Name of the active PMS associated with the deal. It can have more than
one PMS associated with it. It can be null doesn't have any PMS associated.
one PMS associated with it. It can be null if it doesn't have any PMS associated.
- name: main_billing_country_iso_3_per_deal
data_type: string
description: |

View file

@ -11,8 +11,8 @@ select
metric_from_date as metric_from_date,
metric_to_date as metric_to_date,
main_deal_name as main_deal_name,
active_pms as active_pms,
pms as pms,
has_active_pms as has_active_pms,
active_pms_list as active_pms_list,
main_billing_country_iso_3_per_deal as main_billing_country_iso_3_per_deal,
deal_lifecycle_state as deal_lifecycle_state,
deal_hubspot_stage as deal_hubspot_stage,

View file

@ -1435,18 +1435,18 @@ models:
tests:
- not_null
- name: active_pms
- name: has_active_pms
data_type: boolean
description: |
Does the deal have an active associated PMS.
tests:
- not_null
- name: pms
- name: active_pms_list
data_type: string
description: |
Name of the active PMS associated with the deal. It can have more than
one PMS associated with it. It can be null doesn't have any PMS associated.
one PMS associated with it. It can be null if it doesn't have any PMS associated.
- name: main_billing_country_iso_3_per_deal
data_type: string