replace hardcode with variable

This commit is contained in:
Pablo Martin 2024-09-13 15:10:58 +02:00
parent 092b8bd725
commit 4cf74db49a

View file

@ -1,4 +1,7 @@
{{ config(materialized="table") }}
{% set vat_applicable_services = "('Waiver', 'Fee', 'CheckInCover')" %}
with
stg_core__verification_to_payment as (
select * from {{ ref("stg_core__verification_to_payment") }}
@ -22,14 +25,12 @@ with
vtp.id_verification_to_payment,
coalesce(vat.vat_rate, 0) as vat_rate,
case
when vpt.verification_payment_type in ('Waiver', 'Fee', 'CheckInCover')
when vpt.verification_payment_type in {{ vat_applicable_services }}
then true
else false
end as is_service_subject_to_vat,
case
when
vpt.verification_payment_type
not in ('Waiver', 'Fee', 'CheckInCover')
when vpt.verification_payment_type not in {{ vat_applicable_services }}
then false
when vat.vat_rate = 0
then false