Merged PR 3424: aggregated to agg
# Description Changed names for all aggregated models to agg, updated all references and schemas. I did a run and test and everything worked correctly # Checklist - [x] The edited models and dependants run properly with production data. - [ ] The edited models are sufficiently documented. - [x] The edited models contain PK tests, and I've ran and passed them. - [ ] I have checked for DRY opportunities with other models and docs. - [ ] I've picked the right materialization for the affected models. # Other - [ ] Check if a full-refresh is required after this PR is merged. aggregated to agg
This commit is contained in:
commit
4076f016bd
22 changed files with 46 additions and 46 deletions
|
|
@ -10,47 +10,47 @@ with
|
|||
),
|
||||
created_bookings as (
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_monthly_created_bookings") }}
|
||||
from {{ ref("int_kpis__agg_monthly_created_bookings") }}
|
||||
where dimension in ('by_deal') and dimension_value <> 'UNSET'
|
||||
),
|
||||
check_out_bookings as (
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_monthly_check_out_bookings") }}
|
||||
from {{ ref("int_kpis__agg_monthly_check_out_bookings") }}
|
||||
where dimension in ('by_deal') and dimension_value <> 'UNSET'
|
||||
),
|
||||
cancelled_bookings as (
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_monthly_cancelled_bookings") }}
|
||||
from {{ ref("int_kpis__agg_monthly_cancelled_bookings") }}
|
||||
where dimension in ('by_deal') and dimension_value <> 'UNSET'
|
||||
),
|
||||
billable_bookings as (
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_monthly_billable_bookings") }}
|
||||
from {{ ref("int_kpis__agg_monthly_billable_bookings") }}
|
||||
where dimension in ('by_deal') and dimension_value <> 'UNSET'
|
||||
),
|
||||
created_guest_journeys as (
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_monthly_created_guest_journeys") }}
|
||||
from {{ ref("int_kpis__agg_monthly_created_guest_journeys") }}
|
||||
where dimension in ('by_deal') and dimension_value <> 'UNSET'
|
||||
),
|
||||
started_guest_journeys as (
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_monthly_started_guest_journeys") }}
|
||||
from {{ ref("int_kpis__agg_monthly_started_guest_journeys") }}
|
||||
where dimension in ('by_deal') and dimension_value <> 'UNSET'
|
||||
),
|
||||
completed_guest_journeys as (
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_monthly_completed_guest_journeys") }}
|
||||
from {{ ref("int_kpis__agg_monthly_completed_guest_journeys") }}
|
||||
where dimension in ('by_deal') and dimension_value <> 'UNSET'
|
||||
),
|
||||
guest_journeys_with_payment as (
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_monthly_guest_journeys_with_payment") }}
|
||||
from {{ ref("int_kpis__agg_monthly_guest_journeys_with_payment") }}
|
||||
where dimension in ('by_deal') and dimension_value <> 'UNSET'
|
||||
),
|
||||
guest_payments as (
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_monthly_guest_payments") }}
|
||||
from {{ ref("int_kpis__agg_monthly_guest_payments") }}
|
||||
where dimension in ('by_deal') and dimension_value <> 'UNSET'
|
||||
),
|
||||
int_xero__monthly_invoicing_history_by_deal as (
|
||||
|
|
|
|||
|
|
@ -6,104 +6,104 @@ previous year for each line & computing relative increment. --
|
|||
with
|
||||
created_bookings as (
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_mtd_created_bookings") }}
|
||||
from {{ ref("int_kpis__agg_mtd_created_bookings") }}
|
||||
where
|
||||
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
|
||||
and dimension_value <> 'UNSET'
|
||||
union all
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_monthly_created_bookings") }}
|
||||
from {{ ref("int_kpis__agg_monthly_created_bookings") }}
|
||||
where
|
||||
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
|
||||
and dimension_value <> 'UNSET'
|
||||
),
|
||||
check_out_bookings as (
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_mtd_check_out_bookings") }}
|
||||
from {{ ref("int_kpis__agg_mtd_check_out_bookings") }}
|
||||
where
|
||||
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
|
||||
and dimension_value <> 'UNSET'
|
||||
union all
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_monthly_check_out_bookings") }}
|
||||
from {{ ref("int_kpis__agg_monthly_check_out_bookings") }}
|
||||
where
|
||||
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
|
||||
and dimension_value <> 'UNSET'
|
||||
),
|
||||
cancelled_bookings as (
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_mtd_cancelled_bookings") }}
|
||||
from {{ ref("int_kpis__agg_mtd_cancelled_bookings") }}
|
||||
where
|
||||
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
|
||||
and dimension_value <> 'UNSET'
|
||||
union all
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_monthly_cancelled_bookings") }}
|
||||
from {{ ref("int_kpis__agg_monthly_cancelled_bookings") }}
|
||||
where
|
||||
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
|
||||
and dimension_value <> 'UNSET'
|
||||
),
|
||||
billable_bookings as (
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_mtd_billable_bookings") }}
|
||||
from {{ ref("int_kpis__agg_mtd_billable_bookings") }}
|
||||
where
|
||||
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
|
||||
and dimension_value <> 'UNSET'
|
||||
union all
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_monthly_billable_bookings") }}
|
||||
from {{ ref("int_kpis__agg_monthly_billable_bookings") }}
|
||||
where
|
||||
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
|
||||
and dimension_value <> 'UNSET'
|
||||
),
|
||||
created_guest_journeys as (
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_mtd_created_guest_journeys") }}
|
||||
from {{ ref("int_kpis__agg_mtd_created_guest_journeys") }}
|
||||
where
|
||||
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
|
||||
and dimension_value <> 'UNSET'
|
||||
union all
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_monthly_created_guest_journeys") }}
|
||||
from {{ ref("int_kpis__agg_monthly_created_guest_journeys") }}
|
||||
where
|
||||
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
|
||||
and dimension_value <> 'UNSET'
|
||||
),
|
||||
started_guest_journeys as (
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_mtd_started_guest_journeys") }}
|
||||
from {{ ref("int_kpis__agg_mtd_started_guest_journeys") }}
|
||||
where
|
||||
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
|
||||
and dimension_value <> 'UNSET'
|
||||
union all
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_monthly_started_guest_journeys") }}
|
||||
from {{ ref("int_kpis__agg_monthly_started_guest_journeys") }}
|
||||
where
|
||||
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
|
||||
and dimension_value <> 'UNSET'
|
||||
),
|
||||
completed_guest_journeys as (
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_mtd_completed_guest_journeys") }}
|
||||
from {{ ref("int_kpis__agg_mtd_completed_guest_journeys") }}
|
||||
where
|
||||
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
|
||||
and dimension_value <> 'UNSET'
|
||||
union all
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_monthly_completed_guest_journeys") }}
|
||||
from {{ ref("int_kpis__agg_monthly_completed_guest_journeys") }}
|
||||
where
|
||||
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
|
||||
and dimension_value <> 'UNSET'
|
||||
),
|
||||
guest_journeys_with_payment as (
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_mtd_guest_journeys_with_payment") }}
|
||||
from {{ ref("int_kpis__agg_mtd_guest_journeys_with_payment") }}
|
||||
where
|
||||
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
|
||||
and dimension_value <> 'UNSET'
|
||||
union all
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_monthly_guest_journeys_with_payment") }}
|
||||
from {{ ref("int_kpis__agg_monthly_guest_journeys_with_payment") }}
|
||||
where
|
||||
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
|
||||
and dimension_value <> 'UNSET'
|
||||
|
|
@ -114,13 +114,13 @@ with
|
|||
int_mtd_deal_metrics as (select * from {{ ref("int_mtd_deal_metrics") }}),
|
||||
guest_payments as (
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_mtd_guest_payments") }}
|
||||
from {{ ref("int_kpis__agg_mtd_guest_payments") }}
|
||||
where
|
||||
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
|
||||
and dimension_value <> 'UNSET'
|
||||
union all
|
||||
select *
|
||||
from {{ ref("int_kpis__aggregated_monthly_guest_payments") }}
|
||||
from {{ ref("int_kpis__agg_monthly_guest_payments") }}
|
||||
where
|
||||
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
|
||||
and dimension_value <> 'UNSET'
|
||||
|
|
|
|||
|
|
@ -478,7 +478,7 @@ models:
|
|||
Count of accumulated bookings created in a given month up to the
|
||||
given date and per specified dimension.
|
||||
|
||||
- name: int_kpis__aggregated_monthly_created_bookings
|
||||
- name: int_kpis__agg_monthly_created_bookings
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
Monthly Created Bookings.
|
||||
|
|
@ -532,7 +532,7 @@ models:
|
|||
data_type: bigint
|
||||
description: The monthly created bookings for a given date, dimension and value.
|
||||
|
||||
- name: int_kpis__aggregated_mtd_created_bookings
|
||||
- name: int_kpis__agg_mtd_created_bookings
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
Month-To-Date Created Bookings.
|
||||
|
|
@ -782,7 +782,7 @@ models:
|
|||
Count of accumulated guest journeys created in a given month up to the
|
||||
given date and per specified dimension.
|
||||
|
||||
- name: int_kpis__aggregated_monthly_created_guest_journeys
|
||||
- name: int_kpis__agg_monthly_created_guest_journeys
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
Monthly Created Guest Journeys.
|
||||
|
|
@ -835,7 +835,7 @@ models:
|
|||
data_type: bigint
|
||||
description: The monthtly created guest journeys for a given date, dimension and value.
|
||||
|
||||
- name: int_kpis__aggregated_mtd_created_guest_journeys
|
||||
- name: int_kpis__agg_mtd_created_guest_journeys
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
Month-To-Date Created Guest Journeys.
|
||||
|
|
@ -1084,7 +1084,7 @@ models:
|
|||
Count of accumulated guest journeys started in a given month up to the
|
||||
given date and per specified dimension.
|
||||
|
||||
- name: int_kpis__aggregated_monthly_started_guest_journeys
|
||||
- name: int_kpis__agg_monthly_started_guest_journeys
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
Monthly Started Guest Journeys.
|
||||
|
|
@ -1137,7 +1137,7 @@ models:
|
|||
data_type: bigint
|
||||
description: The monthly started guest journeys for a given date, dimension and value.
|
||||
|
||||
- name: int_kpis__aggregated_mtd_started_guest_journeys
|
||||
- name: int_kpis__agg_mtd_started_guest_journeys
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
Month-To-Date Started Guest Journeys.
|
||||
|
|
@ -1386,7 +1386,7 @@ models:
|
|||
Count of accumulated guest journeys completed in a given month up to the
|
||||
given date and per specified dimension.
|
||||
|
||||
- name: int_kpis__aggregated_monthly_completed_guest_journeys
|
||||
- name: int_kpis__agg_monthly_completed_guest_journeys
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
Monthly Completed Guest Journeys.
|
||||
|
|
@ -1439,7 +1439,7 @@ models:
|
|||
data_type: bigint
|
||||
description: The monthly completed guest journeys for a given date, dimension and value.
|
||||
|
||||
- name: int_kpis__aggregated_mtd_completed_guest_journeys
|
||||
- name: int_kpis__agg_mtd_completed_guest_journeys
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
Month-To-Date Completed Guest Journeys.
|
||||
|
|
@ -1688,7 +1688,7 @@ models:
|
|||
Count of accumulated guest journeys completed in a given month up to the
|
||||
given date and per specified dimension.
|
||||
|
||||
- name: int_kpis__aggregated_monthly_guest_journeys_with_payment
|
||||
- name: int_kpis__agg_monthly_guest_journeys_with_payment
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
Monthly Guest Journeys with Payment.
|
||||
|
|
@ -1741,7 +1741,7 @@ models:
|
|||
data_type: bigint
|
||||
description: The monthly guest journeys with payment for a given date, dimension and value.
|
||||
|
||||
- name: int_kpis__aggregated_mtd_guest_journeys_with_payment
|
||||
- name: int_kpis__agg_mtd_guest_journeys_with_payment
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
Month-To-Date Guest Journeys with Payment.
|
||||
|
|
@ -2045,7 +2045,7 @@ models:
|
|||
Sum of accumulated total payments paid by guests, without taxes,
|
||||
in GBP in a given month up to the given date and per specified dimension.
|
||||
|
||||
- name: int_kpis__aggregated_monthly_guest_payments
|
||||
- name: int_kpis__agg_monthly_guest_payments
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
Monthly Guest Payments.
|
||||
|
|
@ -2124,7 +2124,7 @@ models:
|
|||
The monthly total payments paid by guests, without taxes, in GBP
|
||||
for a given range date, dimension and value.
|
||||
|
||||
- name: int_kpis__aggregated_mtd_guest_payments
|
||||
- name: int_kpis__agg_mtd_guest_payments
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
Month-To-Date Guest Payments.
|
||||
|
|
@ -2399,7 +2399,7 @@ models:
|
|||
Count of accumulated bookings checked-out in a given month up to the
|
||||
given date and per specified dimension.
|
||||
|
||||
- name: int_kpis__aggregated_monthly_check_out_bookings
|
||||
- name: int_kpis__agg_monthly_check_out_bookings
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
Monthly Check-out Bookings.
|
||||
|
|
@ -2452,7 +2452,7 @@ models:
|
|||
data_type: bigint
|
||||
description: The monthly checked-out bookings for a given date, dimension and value.
|
||||
|
||||
- name: int_kpis__aggregated_mtd_check_out_bookings
|
||||
- name: int_kpis__agg_mtd_check_out_bookings
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
Month-To-Date Check-out Bookings.
|
||||
|
|
@ -2701,7 +2701,7 @@ models:
|
|||
Count of accumulated bookings billable in a given month up to the
|
||||
given date and per specified dimension.
|
||||
|
||||
- name: int_kpis__aggregated_monthly_billable_bookings
|
||||
- name: int_kpis__agg_monthly_billable_bookings
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
Monthly Billable Bookings.
|
||||
|
|
@ -2754,7 +2754,7 @@ models:
|
|||
data_type: bigint
|
||||
description: The monthly billable bookings for a given date, dimension and value.
|
||||
|
||||
- name: int_kpis__aggregated_mtd_billable_bookings
|
||||
- name: int_kpis__agg_mtd_billable_bookings
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
Month-To-Date Billable Bookings.
|
||||
|
|
@ -3003,7 +3003,7 @@ models:
|
|||
Count of accumulated bookings cancelled in a given month up to the
|
||||
given date and per specified dimension.
|
||||
|
||||
- name: int_kpis__aggregated_monthly_cancelled_bookings
|
||||
- name: int_kpis__agg_monthly_cancelled_bookings
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
Monthly Cancelled Bookings.
|
||||
|
|
@ -3056,7 +3056,7 @@ models:
|
|||
data_type: bigint
|
||||
description: The monthly cancelled bookings for a given date, dimension and value.
|
||||
|
||||
- name: int_kpis__aggregated_mtd_cancelled_bookings
|
||||
- name: int_kpis__agg_mtd_cancelled_bookings
|
||||
description: |
|
||||
This model computes the dimension aggregation for
|
||||
Month-To-Date Cancelled Bookings.
|
||||
|
|
|
|||
|
|
@ -459,7 +459,7 @@ models:
|
|||
in the abovementioned models.
|
||||
|
||||
To keep in mind: aggregating the information of this model will not necessarily result into
|
||||
the int_mtd_aggregated metrics because 1) the mtd version contains more computing dates
|
||||
the int_mtd_aggregated_metrics because 1) the mtd version contains more computing dates
|
||||
than the by deal version, the latest being a subset of the first, and 2) the deal based model
|
||||
enforces that a booking/guest journey/listing/etc has a host with a deal assigned, which is
|
||||
not necessarily the case.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue