more refactoring

This commit is contained in:
Pablo Martin 2024-03-08 18:08:05 +01:00
parent 1a347c721b
commit c4b9c42a3c
2 changed files with 31 additions and 8 deletions

View file

@ -0,0 +1,23 @@
with
stg_core__verification_to_payment as (
select * from {{ ref("stg_core__verification_to_payment") }}
),
stg_core__verification_payment_type as (
select * from {{ ref("stg_core__verification_payment_type") }}
)
select
vtp.id_verification_to_payment,
vtp.id_payment,
vtp.is_refundable,
vtp.created_at_utc,
vtp.updated_at_utc,
vtp.refund_due_at_utc,
vtp.payment_due_at_utc,
vtp.id_superhog_user,
vtp.id_verification,
vpt.verification_payment_type
from stg_core__verification_to_payment vtp
left join
stg_core__verification_payment_type vpt
on vtp.id_verification_payment_type = vpt.id_verification_payment_type