Addressed comments
This commit is contained in:
parent
392006b71c
commit
5d642d2c77
6 changed files with 43 additions and 57 deletions
|
|
@ -28,7 +28,7 @@
|
|||
sum(started_guest_journeys) as started_guest_journeys,
|
||||
sum(completed_guest_journeys) as completed_guest_journeys,
|
||||
sum(count_csat_score) as count_csat_score,
|
||||
sum(count_csat_score * average_csat_score)/sum(count_csat_score) as average_csat_score
|
||||
sum(count_csat_score * average_csat_score) / nullif(sum(count_csat_score), 0) as average_csat_score
|
||||
from {{ ref("int_kpis__metric_monthly_check_in_attributed_guest_journeys") }}
|
||||
group by 1, 2, 3, 4
|
||||
{% if not loop.last %}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
sum(started_guest_journeys) as started_guest_journeys,
|
||||
sum(completed_guest_journeys) as completed_guest_journeys,
|
||||
sum(count_csat_score) as count_csat_score,
|
||||
sum(count_csat_score * average_csat_score)/sum(count_csat_score) as average_csat_score
|
||||
sum(count_csat_score * average_csat_score) / nullif(sum(count_csat_score), 0) as average_csat_score
|
||||
from {{ ref("int_kpis__metric_mtd_check_in_attributed_guest_journeys") }}
|
||||
group by 1, 2, 3, 4
|
||||
{% if not loop.last %}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ select
|
|||
end
|
||||
) as count_csat_score,
|
||||
avg(
|
||||
distinct case
|
||||
case
|
||||
when gsr.id_verification_request is not null
|
||||
then gsr.experience_rating
|
||||
else null
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ select
|
|||
sum(b.started_guest_journeys) as started_guest_journeys,
|
||||
sum(b.completed_guest_journeys) as completed_guest_journeys,
|
||||
sum(b.count_csat_score) as count_csat_score,
|
||||
sum(b.count_csat_score * b.average_csat_score)/sum(b.count_csat_score) as average_csat_score
|
||||
sum(b.count_csat_score * b.average_csat_score) / nullif(sum(b.count_csat_score), 0) as average_csat_score
|
||||
from {{ ref("int_kpis__dimension_dates") }} d
|
||||
left join
|
||||
{{ ref("int_kpis__metric_daily_check_in_attributed_guest_journeys") }} b
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ select
|
|||
sum(b.started_guest_journeys) as started_guest_journeys,
|
||||
sum(b.completed_guest_journeys) as completed_guest_journeys,
|
||||
sum(b.count_csat_score) as count_csat_score,
|
||||
sum(b.count_csat_score * b.average_csat_score)/sum(b.count_csat_score) as average_csat_score
|
||||
sum(b.count_csat_score * b.average_csat_score) / nullif(sum(b.count_csat_score), 0) as average_csat_score
|
||||
from {{ ref("int_kpis__dimension_dates") }} d
|
||||
left join
|
||||
{{ ref("int_kpis__metric_daily_check_in_attributed_guest_journeys") }} b
|
||||
|
|
|
|||
|
|
@ -3290,31 +3290,31 @@ models:
|
|||
- name: created_guest_journeys_not_cancelled
|
||||
data_type: numeric
|
||||
description: |
|
||||
Count of daily guest journeys created, excluding cancelled bookings,
|
||||
in a given date and per specified dimension.
|
||||
Accumulated count of daily guest journeys created, excluding cancelled
|
||||
bookings, in a given date and per specified dimension.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: started_guest_journeys_not_cancelled
|
||||
data_type: numeric
|
||||
description: |
|
||||
Count of daily guest journeys started, excluding cancelled bookings,
|
||||
in a given date and per specified dimension.
|
||||
Accumulated count of daily guest journeys started, excluding cancelled
|
||||
bookings, in a given date and per specified dimension.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: completed_guest_journeys_not_cancelled
|
||||
data_type: numeric
|
||||
description: |
|
||||
Count of daily guest journeys completed, excluding cancelled bookings,
|
||||
in a given date and per specified dimension.
|
||||
Accumulated count of daily guest journeys completed, excluding cancelled
|
||||
bookings, in a given date and per specified dimension.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: created_guest_journeys
|
||||
data_type: numeric
|
||||
description: |
|
||||
Count of daily guest journeys created in a given date and
|
||||
Accumulated count of daily guest journeys created in a given date and
|
||||
per specified dimension.
|
||||
tests:
|
||||
- not_null
|
||||
|
|
@ -3322,7 +3322,7 @@ models:
|
|||
- name: started_guest_journeys
|
||||
data_type: numeric
|
||||
description: |
|
||||
Count of daily guest journeys started in a given date and
|
||||
Accumulated count of daily guest journeys started in a given date and
|
||||
per specified dimension.
|
||||
tests:
|
||||
- not_null
|
||||
|
|
@ -3330,7 +3330,7 @@ models:
|
|||
- name: completed_guest_journeys
|
||||
data_type: numeric
|
||||
description: |
|
||||
Count of daily guest journeys completed in a given date and
|
||||
Accumulated count of daily guest journeys completed in a given date and
|
||||
per specified dimension.
|
||||
tests:
|
||||
- not_null
|
||||
|
|
@ -3338,17 +3338,13 @@ models:
|
|||
- name: count_csat_score
|
||||
data_type: numeric
|
||||
description: |
|
||||
Count of daily guest journeys with CSAT (customer satisfaction score)
|
||||
in a given date and per specified dimension.
|
||||
tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
strictly: false
|
||||
Accumulated count of guest journeys with CSAT
|
||||
(customer satisfaction score) in a given date, dimension, and value..
|
||||
|
||||
- name: average_csat_score
|
||||
data_type: numeric
|
||||
description: |
|
||||
Average daily CSAT score in a given date and per specified dimension.
|
||||
Accumulated average CSAT score in a given date, dimension, and value.
|
||||
tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
|
|
@ -3468,17 +3464,14 @@ models:
|
|||
- name: count_csat_score
|
||||
data_type: numeric
|
||||
description: |
|
||||
Count of daily guest journeys with CSAT (customer satisfaction score)
|
||||
in a given date and per specified dimension.
|
||||
tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
strictly: false
|
||||
Monthly aggregated count of guest journeys with CSAT
|
||||
(customer satisfaction score) in a given date, dimension, and value.
|
||||
|
||||
- name: average_csat_score
|
||||
data_type: numeric
|
||||
description: |
|
||||
Average daily CSAT score in a given date and per specified dimension.
|
||||
Monthly aggregated average CSAT score in a given date,
|
||||
dimension, and value.
|
||||
tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
|
|
@ -3574,31 +3567,31 @@ models:
|
|||
- name: created_guest_journeys_not_cancelled
|
||||
data_type: numeric
|
||||
description: |
|
||||
Count of daily guest journeys created, excluding cancelled bookings,
|
||||
in a given date and per specified dimension.
|
||||
Accumulated count of daily guest journeys created, excluding cancelled
|
||||
bookings, in a given date and per specified dimension.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: started_guest_journeys_not_cancelled
|
||||
data_type: numeric
|
||||
description: |
|
||||
Count of daily guest journeys started, excluding cancelled bookings,
|
||||
in a given date and per specified dimension.
|
||||
Accumulated count of daily guest journeys started, excluding cancelled
|
||||
bookings, in a given date and per specified dimension.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: completed_guest_journeys_not_cancelled
|
||||
data_type: numeric
|
||||
description: |
|
||||
Count of daily guest journeys completed, excluding cancelled bookings,
|
||||
in a given date and per specified dimension.
|
||||
Accumulated count of daily guest journeys completed, excluding cancelled
|
||||
bookings, in a given date and per specified dimension.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: created_guest_journeys
|
||||
data_type: numeric
|
||||
description: |
|
||||
Count of daily guest journeys created in a given date and
|
||||
Accumulated count of daily guest journeys created in a given date and
|
||||
per specified dimension.
|
||||
tests:
|
||||
- not_null
|
||||
|
|
@ -3606,7 +3599,7 @@ models:
|
|||
- name: started_guest_journeys
|
||||
data_type: numeric
|
||||
description: |
|
||||
Count of daily guest journeys started in a given date and
|
||||
Accumulated count of daily guest journeys started in a given date and
|
||||
per specified dimension.
|
||||
tests:
|
||||
- not_null
|
||||
|
|
@ -3614,7 +3607,7 @@ models:
|
|||
- name: completed_guest_journeys
|
||||
data_type: numeric
|
||||
description: |
|
||||
Count of daily guest journeys completed in a given date and
|
||||
Accumulated count of daily guest journeys completed in a given date and
|
||||
per specified dimension.
|
||||
tests:
|
||||
- not_null
|
||||
|
|
@ -3622,17 +3615,13 @@ models:
|
|||
- name: count_csat_score
|
||||
data_type: numeric
|
||||
description: |
|
||||
Count of daily guest journeys with CSAT (customer satisfaction score)
|
||||
in a given date and per specified dimension.
|
||||
tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
strictly: false
|
||||
Accumulated count of guest journeys with CSAT
|
||||
(customer satisfaction score) in a given date, dimension, and value..
|
||||
|
||||
- name: average_csat_score
|
||||
data_type: numeric
|
||||
description: |
|
||||
Average daily CSAT score in a given date and per specified dimension.
|
||||
Accumulated average CSAT score in a given date, dimension, and value.
|
||||
tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
|
|
@ -3704,7 +3693,7 @@ models:
|
|||
- name: created_guest_journeys_not_cancelled
|
||||
data_type: numeric
|
||||
description: |
|
||||
Monthly aggregated count of guest journeys created, excluding
|
||||
Month-to-date aggregated count of guest journeys created, excluding
|
||||
cancelled bookings, for a given date, dimension, and value.
|
||||
tests:
|
||||
- not_null
|
||||
|
|
@ -3712,7 +3701,7 @@ models:
|
|||
- name: started_guest_journeys_not_cancelled
|
||||
data_type: numeric
|
||||
description: |
|
||||
Monthly aggregated count of guest journeys started, excluding
|
||||
Month-to-date aggregated count of guest journeys started, excluding
|
||||
cancelled bookings, for a given date, dimension, and value.
|
||||
tests:
|
||||
- not_null
|
||||
|
|
@ -3720,7 +3709,7 @@ models:
|
|||
- name: completed_guest_journeys_not_cancelled
|
||||
data_type: numeric
|
||||
description: |
|
||||
Monthly aggregated count of guest journeys completed, excluding
|
||||
Month-to-date aggregated count of guest journeys completed, excluding
|
||||
cancelled bookings, for a given date, dimension, and value.
|
||||
tests:
|
||||
- not_null
|
||||
|
|
@ -3728,7 +3717,7 @@ models:
|
|||
- name: created_guest_journeys
|
||||
data_type: numeric
|
||||
description: |
|
||||
Monthly aggregated count of guest journeys created for a given date,
|
||||
Month-to-date aggregated count of guest journeys created for a given date,
|
||||
dimension, and value.
|
||||
tests:
|
||||
- not_null
|
||||
|
|
@ -3736,7 +3725,7 @@ models:
|
|||
- name: started_guest_journeys
|
||||
data_type: numeric
|
||||
description: |
|
||||
Monthly aggregated count of guest journeys started for a given date,
|
||||
Month-to-date aggregated count of guest journeys started for a given date,
|
||||
dimension, and value.
|
||||
tests:
|
||||
- not_null
|
||||
|
|
@ -3744,7 +3733,7 @@ models:
|
|||
- name: completed_guest_journeys
|
||||
data_type: numeric
|
||||
description: |
|
||||
Monthly aggregated count of guest journeys completed for a given date,
|
||||
Month-to-date aggregated count of guest journeys completed for a given date,
|
||||
dimension, and value.
|
||||
tests:
|
||||
- not_null
|
||||
|
|
@ -3752,17 +3741,14 @@ models:
|
|||
- name: count_csat_score
|
||||
data_type: numeric
|
||||
description: |
|
||||
Count of daily guest journeys with CSAT (customer satisfaction score)
|
||||
in a given date and per specified dimension.
|
||||
tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
strictly: false
|
||||
Month-to-date aggregated count of guest journeys with CSAT
|
||||
(customer satisfaction score) in a given date, dimension, and value.
|
||||
|
||||
- name: average_csat_score
|
||||
data_type: numeric
|
||||
description: |
|
||||
Average daily CSAT score in a given date and per specified dimension.
|
||||
Month-to-date aggregated average CSAT score in a given date,
|
||||
dimension, and value.
|
||||
tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue