Merged PR 5187: Switch models that use int_core__verification_payments

# Description

Switches all models that still use int_core__verification_payments, except for the equivalent in reporting that needs a parallel GJ Payments to do a proper refactor.

# 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.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #30024
This commit is contained in:
Oriol Roqué Paniagua 2025-05-12 15:58:53 +00:00
parent c6b61856f0
commit 3badc02c9f
9 changed files with 132 additions and 110 deletions

View file

@ -2,11 +2,26 @@ with int_core__payments as (select * from {{ ref("int_core__payments") }})
select
id_payment as id_payment,
payment_reference as payment_reference,
verification_payment_type as verification_payment_type,
-- Reapply original naming + Keep original field name to avoid breaking PBI
case
when product_name = 'CHECKINCOVER'
then 'CheckInCover'
when product_name = 'FEE'
then 'Fee'
when product_name = 'WAIVER'
then 'Waiver'
when product_name = 'DEPOSIT'
then 'Deposit'
when product_name = 'UNKNOWN'
then null
else product_name
end as verification_payment_type,
is_host_taking_waiver_risk as is_host_taking_waiver_risk,
payaway_percentage as payaway_percentage,
payaway_minimum_commission_local_curr as payaway_minimum_commission_local_curr,
payment_status as payment_status,
-- Renaming to original field name to avoid breaking PBI
payaway_minimum_commission_in_txn_currency as payaway_minimum_commission_local_curr,
-- Reapply original naming to avoid breaking PBI
initcap(payment_status) as payment_status,
payment_due_date_utc as payment_due_date_utc,
payment_paid_date_utc as payment_paid_date_utc,
refund_payment_reference as refund_payment_reference,

View file

@ -26,7 +26,8 @@ select
verification_end_at_utc as verification_end_at_utc,
verification_end_date_utc as verification_end_date_utc,
currency as currency,
payment_status as payment_status,
-- Reapply original naming to avoid breaking PBI
initcap(payment_status) as payment_status,
payment_paid_date_utc as payment_paid_date_utc,
total_amount_in_txn_currency as total_amount_in_txn_currency,
amount_without_taxes_in_txn_currency as amount_without_taxes_in_txn_currency,