Update name of fields
This commit is contained in:
parent
bd25b473fb
commit
0c311d02e8
7 changed files with 32 additions and 30 deletions
|
|
@ -85,8 +85,8 @@ select
|
||||||
-- DEAL STATIC ATTRIBUTES --
|
-- DEAL STATIC ATTRIBUTES --
|
||||||
ikdd.id_deal,
|
ikdd.id_deal,
|
||||||
ikdd.main_deal_name,
|
ikdd.main_deal_name,
|
||||||
ikdd.active_pms,
|
ikdd.has_active_pms,
|
||||||
ikdd.pms,
|
ikdd.active_pms_list,
|
||||||
ikdd.main_billing_country_iso_3_per_deal,
|
ikdd.main_billing_country_iso_3_per_deal,
|
||||||
|
|
||||||
-- DEAL LIFECYCLE --
|
-- DEAL LIFECYCLE --
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ with
|
||||||
date,
|
date,
|
||||||
id_deal,
|
id_deal,
|
||||||
main_deal_name,
|
main_deal_name,
|
||||||
active_pms,
|
has_active_pms,
|
||||||
pms,
|
active_pms_list,
|
||||||
main_billing_country_iso_3_per_deal,
|
main_billing_country_iso_3_per_deal,
|
||||||
deal_lifecycle_state,
|
deal_lifecycle_state,
|
||||||
'All History' as time_window,
|
'All History' as time_window,
|
||||||
|
|
@ -122,8 +122,8 @@ with
|
||||||
date,
|
date,
|
||||||
id_deal,
|
id_deal,
|
||||||
main_deal_name,
|
main_deal_name,
|
||||||
active_pms,
|
has_active_pms,
|
||||||
pms,
|
active_pms_list,
|
||||||
main_billing_country_iso_3_per_deal,
|
main_billing_country_iso_3_per_deal,
|
||||||
deal_lifecycle_state,
|
deal_lifecycle_state,
|
||||||
'Previous 12 months' as time_window,
|
'Previous 12 months' as time_window,
|
||||||
|
|
@ -220,8 +220,8 @@ with
|
||||||
date,
|
date,
|
||||||
id_deal,
|
id_deal,
|
||||||
main_deal_name,
|
main_deal_name,
|
||||||
active_pms,
|
has_active_pms,
|
||||||
pms,
|
active_pms_list,
|
||||||
main_billing_country_iso_3_per_deal,
|
main_billing_country_iso_3_per_deal,
|
||||||
deal_lifecycle_state,
|
deal_lifecycle_state,
|
||||||
'Previous 6 months' as time_window,
|
'Previous 6 months' as time_window,
|
||||||
|
|
@ -318,8 +318,8 @@ with
|
||||||
date,
|
date,
|
||||||
id_deal,
|
id_deal,
|
||||||
main_deal_name,
|
main_deal_name,
|
||||||
active_pms,
|
has_active_pms,
|
||||||
pms,
|
active_pms_list,
|
||||||
main_billing_country_iso_3_per_deal,
|
main_billing_country_iso_3_per_deal,
|
||||||
deal_lifecycle_state,
|
deal_lifecycle_state,
|
||||||
'Previous 3 months' as time_window,
|
'Previous 3 months' as time_window,
|
||||||
|
|
@ -416,8 +416,8 @@ with
|
||||||
date,
|
date,
|
||||||
id_deal,
|
id_deal,
|
||||||
main_deal_name,
|
main_deal_name,
|
||||||
active_pms,
|
has_active_pms,
|
||||||
pms,
|
active_pms_list,
|
||||||
main_billing_country_iso_3_per_deal,
|
main_billing_country_iso_3_per_deal,
|
||||||
deal_lifecycle_state,
|
deal_lifecycle_state,
|
||||||
'Previous month' as time_window,
|
'Previous month' as time_window,
|
||||||
|
|
@ -537,8 +537,8 @@ select
|
||||||
|
|
||||||
-- Deal attributes
|
-- Deal attributes
|
||||||
mabd.main_deal_name,
|
mabd.main_deal_name,
|
||||||
mabd.active_pms,
|
mabd.has_active_pms,
|
||||||
mabd.pms,
|
mabd.active_pms_list,
|
||||||
mabd.main_billing_country_iso_3_per_deal,
|
mabd.main_billing_country_iso_3_per_deal,
|
||||||
mabd.deal_lifecycle_state,
|
mabd.deal_lifecycle_state,
|
||||||
d.deal_hubspot_stage,
|
d.deal_hubspot_stage,
|
||||||
|
|
|
||||||
|
|
@ -359,18 +359,18 @@ models:
|
||||||
tests:
|
tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|
||||||
- name: active_pms
|
- name: has_active_pms
|
||||||
data_type: boolean
|
data_type: boolean
|
||||||
description: |
|
description: |
|
||||||
Does the deal have an active associated PMS.
|
Does the deal have an active associated PMS.
|
||||||
tests:
|
tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|
||||||
- name: pms
|
- name: active_pms_list
|
||||||
data_type: string
|
data_type: string
|
||||||
description: |
|
description: |
|
||||||
Name of the active PMS associated with the deal. It can have more than
|
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
|
- name: main_billing_country_iso_3_per_deal
|
||||||
data_type: string
|
data_type: string
|
||||||
|
|
@ -1480,18 +1480,18 @@ models:
|
||||||
tests:
|
tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|
||||||
- name: active_pms
|
- name: has_active_pms
|
||||||
data_type: boolean
|
data_type: boolean
|
||||||
description: |
|
description: |
|
||||||
Does the deal have an active associated PMS.
|
Does the deal have an active associated PMS.
|
||||||
tests:
|
tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|
||||||
- name: pms
|
- name: active_pms_list
|
||||||
data_type: string
|
data_type: string
|
||||||
description: |
|
description: |
|
||||||
Name of the active PMS associated with the deal. It can have more than
|
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
|
- name: main_billing_country_iso_3_per_deal
|
||||||
data_type: string
|
data_type: string
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,10 @@ with
|
||||||
select
|
select
|
||||||
cd.id_deal,
|
cd.id_deal,
|
||||||
cd.main_deal_name,
|
cd.main_deal_name,
|
||||||
case when ipd.distinct_active_pms is null then false else true end as active_pms,
|
case
|
||||||
ipd.distinct_active_pms as pms,
|
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.main_billing_country_iso_3_per_deal,
|
||||||
cd.effective_deal_start_date_utc
|
cd.effective_deal_start_date_utc
|
||||||
from combined_deals cd
|
from combined_deals cd
|
||||||
|
|
|
||||||
|
|
@ -450,17 +450,17 @@ models:
|
||||||
in both systems, Hubspot data will take precedence in terms of deal name.
|
in both systems, Hubspot data will take precedence in terms of deal name.
|
||||||
tests:
|
tests:
|
||||||
- not_null
|
- not_null
|
||||||
- name: active_pms
|
- name: has_active_pms
|
||||||
data_type: boolean
|
data_type: boolean
|
||||||
description: |
|
description: |
|
||||||
Does the deal have an active associated PMS.
|
Does the deal have an active associated PMS.
|
||||||
tests:
|
tests:
|
||||||
- not_null
|
- not_null
|
||||||
- name: pms
|
- name: active_pms_list
|
||||||
data_type: string
|
data_type: string
|
||||||
description: |
|
description: |
|
||||||
Name of the active PMS associated with the deal. It can have more than
|
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
|
- name: main_billing_country_iso_3_per_deal
|
||||||
data_type: string
|
data_type: string
|
||||||
description: |
|
description: |
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,8 @@ select
|
||||||
metric_from_date as metric_from_date,
|
metric_from_date as metric_from_date,
|
||||||
metric_to_date as metric_to_date,
|
metric_to_date as metric_to_date,
|
||||||
main_deal_name as main_deal_name,
|
main_deal_name as main_deal_name,
|
||||||
active_pms as active_pms,
|
has_active_pms as has_active_pms,
|
||||||
pms as pms,
|
active_pms_list as active_pms_list,
|
||||||
main_billing_country_iso_3_per_deal as main_billing_country_iso_3_per_deal,
|
main_billing_country_iso_3_per_deal as main_billing_country_iso_3_per_deal,
|
||||||
deal_lifecycle_state as deal_lifecycle_state,
|
deal_lifecycle_state as deal_lifecycle_state,
|
||||||
deal_hubspot_stage as deal_hubspot_stage,
|
deal_hubspot_stage as deal_hubspot_stage,
|
||||||
|
|
|
||||||
|
|
@ -1435,18 +1435,18 @@ models:
|
||||||
tests:
|
tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|
||||||
- name: active_pms
|
- name: has_active_pms
|
||||||
data_type: boolean
|
data_type: boolean
|
||||||
description: |
|
description: |
|
||||||
Does the deal have an active associated PMS.
|
Does the deal have an active associated PMS.
|
||||||
tests:
|
tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|
||||||
- name: pms
|
- name: active_pms_list
|
||||||
data_type: string
|
data_type: string
|
||||||
description: |
|
description: |
|
||||||
Name of the active PMS associated with the deal. It can have more than
|
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
|
- name: main_billing_country_iso_3_per_deal
|
||||||
data_type: string
|
data_type: string
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue