Merged PR 2861: Update mtd_aggregated_metrics

# Description

Update mtd_aggregated_metrics for guest payments to be tax-exclusive

# Checklist

- [x] The edited models and dependants run properly with production data.
- [x] 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.

Update mtd_aggregated_metrics

Related work items: #20045
This commit is contained in:
Joaquin Ossa 2024-09-17 07:09:03 +00:00
commit cc837ecd7a
2 changed files with 5 additions and 5 deletions

View file

@ -11,7 +11,7 @@ with
select * from {{ ref("int_core__verification_requests") }}
),
int_core__verification_payments as (
select * from {{ ref("int_core__verification_payments") }}
select * from {{ ref("int_core__verification_payments", version=2) }}
),
int_core__user_host as (select * from {{ ref("int_core__user_host") }}),
int_core__mtd_accommodation_segmentation as (

View file

@ -11,7 +11,7 @@ This model provides Month-To-Date (MTD) based on Guest Revenue metrics.
{{ config(materialized="table", unique_key=["date", "dimension", "dimension_value"]) }}
with
int_core__verification_payments as (
select * from {{ ref("int_core__verification_payments") }}
select * from {{ ref("int_core__verification_payments", version=2) }}
),
int_core__verification_requests as (
select * from {{ ref("int_core__verification_requests") }}
@ -37,7 +37,7 @@ with
when
upper(vp.verification_payment_type)
in {{ deposit_fees_verification_payment_type_items }}
then vp.amount_in_gbp
then vp.amount_without_taxes_in_gbp
else null
end
) as deposit_fees_in_gbp,
@ -46,7 +46,7 @@ with
when
upper(vp.verification_payment_type)
in {{ waiver_fees_verification_payment_type_items }}
then vp.amount_in_gbp
then vp.amount_without_taxes_in_gbp
else null
end
) as waiver_payments_in_gbp,
@ -55,7 +55,7 @@ with
when
upper(vp.verification_payment_type)
in {{ checkin_cover_fees_verification_payment_type_items }}
then vp.amount_in_gbp
then vp.amount_without_taxes_in_gbp
else null
end
) as checkin_cover_fees_in_gbp