added service_business_type to new_dash_created_services models
This commit is contained in:
parent
c3fedec0f9
commit
07038e8c18
4 changed files with 64 additions and 5 deletions
|
|
@ -7,6 +7,11 @@ select
|
|||
-- Dimensions --
|
||||
coalesce(icbs.id_deal, 'UNSET') as id_deal,
|
||||
case when icbsd.is_upgraded_service then 'YES' else 'NO' end as is_upgraded_service,
|
||||
case
|
||||
when icbsd.service_business_type = 'UNKNOWN'
|
||||
then 'UNSET'
|
||||
else coalesce(icbsd.service_business_type, 'UNSET')
|
||||
end as service_business_type,
|
||||
coalesce(icbs.new_dash_version, 'UNSET') as new_dash_version,
|
||||
coalesce(
|
||||
icd.main_billing_country_iso_3_per_deal, 'UNSET'
|
||||
|
|
@ -30,4 +35,4 @@ where
|
|||
and icbs.is_missing_id_deal = false
|
||||
and icbsd.service_detail_created_at_utc
|
||||
>= icbs.user_in_new_dash_since_timestamp_at_utc
|
||||
group by 1, 2, 3, 4, 5, 6, 7, 8
|
||||
group by 1, 2, 3, 4, 5, 6, 7, 8, 9
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ select
|
|||
cs.active_accommodations_per_deal_segmentation,
|
||||
cs.id_deal,
|
||||
-- Dimensions --
|
||||
cs.service_business_type,
|
||||
cs.new_dash_version,
|
||||
cs.is_upgraded_service,
|
||||
cs.main_billing_country_iso_3_per_deal,
|
||||
|
|
@ -29,4 +30,4 @@ left join
|
|||
{{ ref("int_kpis__metric_daily_new_dash_created_services") }} cs
|
||||
on date_trunc('month', cs.date)::date = d.first_day_month
|
||||
where d.is_end_of_month = true and cs.id_deal is not null
|
||||
group by 1, 2, 3, 4, 5, 6, 7, 8
|
||||
group by 1, 2, 3, 4, 5, 6, 7, 8, 9
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ select
|
|||
cs.active_accommodations_per_deal_segmentation,
|
||||
cs.id_deal,
|
||||
-- Dimensions --
|
||||
cs.service_business_type,
|
||||
cs.new_dash_version,
|
||||
cs.is_upgraded_service,
|
||||
cs.main_billing_country_iso_3_per_deal,
|
||||
|
|
@ -29,4 +30,4 @@ left join
|
|||
{{ ref("int_kpis__metric_daily_new_dash_created_services") }} cs
|
||||
on date_trunc('week', cs.date)::date = d.first_day_week
|
||||
where d.is_end_of_week = true and cs.id_deal is not null
|
||||
group by 1, 2, 3, 4, 5, 6, 7, 8
|
||||
group by 1, 2, 3, 4, 5, 6, 7, 8, 9
|
||||
|
|
|
|||
|
|
@ -5438,6 +5438,21 @@ models:
|
|||
- "YES"
|
||||
- "NO"
|
||||
|
||||
- name: service_business_type
|
||||
data_type: string
|
||||
description: |
|
||||
Identifies the service type (Screening, Deposit Management, Protection)
|
||||
according to New Pricing documentation.
|
||||
Cannot be null.
|
||||
tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
- "SCREENING"
|
||||
- "PROTECTION"
|
||||
- "DEPOSIT_MANAGEMENT"
|
||||
- "UNSET"
|
||||
|
||||
- name: new_dash_version
|
||||
data_type: string
|
||||
description: |
|
||||
|
|
@ -5488,7 +5503,8 @@ models:
|
|||
- end_date,
|
||||
- service_name,
|
||||
- id_deal,
|
||||
- active_accommodations_per_deal_segmentation.
|
||||
- active_accommodations_per_deal_segmentation,
|
||||
- service_business_type.
|
||||
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
|
|
@ -5497,6 +5513,7 @@ models:
|
|||
- service_name
|
||||
- id_deal
|
||||
- active_accommodations_per_deal_segmentation
|
||||
- service_business_type
|
||||
|
||||
columns:
|
||||
- name: start_date
|
||||
|
|
@ -5525,6 +5542,21 @@ models:
|
|||
tests:
|
||||
- not_null
|
||||
|
||||
- name: service_business_type
|
||||
data_type: string
|
||||
description: |
|
||||
Identifies the service type (Screening, Deposit Management, Protection)
|
||||
according to New Pricing documentation.
|
||||
Cannot be null.
|
||||
tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
- "SCREENING"
|
||||
- "PROTECTION"
|
||||
- "DEPOSIT_MANAGEMENT"
|
||||
- "UNSET"
|
||||
|
||||
- name: is_upgraded_service
|
||||
data_type: string
|
||||
description: |
|
||||
|
|
@ -5595,7 +5627,8 @@ models:
|
|||
- end_date,
|
||||
- service_name,
|
||||
- id_deal,
|
||||
- active_accommodations_per_deal_segmentation.
|
||||
- active_accommodations_per_deal_segmentation,
|
||||
- service_business_type.
|
||||
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
|
|
@ -5604,6 +5637,7 @@ models:
|
|||
- service_name
|
||||
- id_deal
|
||||
- active_accommodations_per_deal_segmentation
|
||||
- service_business_type
|
||||
|
||||
columns:
|
||||
- name: start_date
|
||||
|
|
@ -5632,6 +5666,21 @@ models:
|
|||
tests:
|
||||
- not_null
|
||||
|
||||
- name: service_business_type
|
||||
data_type: string
|
||||
description: |
|
||||
Identifies the service type (Screening, Deposit Management, Protection)
|
||||
according to New Pricing documentation.
|
||||
Cannot be null.
|
||||
tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
- "SCREENING"
|
||||
- "PROTECTION"
|
||||
- "DEPOSIT_MANAGEMENT"
|
||||
- "UNSET"
|
||||
|
||||
- name: is_upgraded_service
|
||||
data_type: string
|
||||
description: |
|
||||
|
|
@ -5733,6 +5782,7 @@ models:
|
|||
- by_new_dash_version
|
||||
- by_has_upgraded_service
|
||||
- by_service
|
||||
- by_service_business_type
|
||||
|
||||
- name: dimension_value
|
||||
data_type: string
|
||||
|
|
@ -5797,6 +5847,7 @@ models:
|
|||
- by_new_dash_version
|
||||
- by_has_upgraded_service
|
||||
- by_service
|
||||
- by_service_business_type
|
||||
|
||||
- name: dimension_value
|
||||
data_type: string
|
||||
|
|
@ -5854,6 +5905,7 @@ models:
|
|||
- by_new_dash_version
|
||||
- by_has_upgraded_service
|
||||
- by_service
|
||||
- by_service_business_type
|
||||
|
||||
- name: dimension_value
|
||||
data_type: string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue