Merged PR 5329: Refactor model var to global var

# Description

Pulls up the date var in `int_core__guest_product_payments_v2` into the global project (will soon be used in other models).

The name was also changed to something more descriptive for the purpose it will follow in the global project.

# 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: #30165
This commit is contained in:
Pablo Martin 2025-05-27 12:55:47 +00:00
commit 420d93d9bf
2 changed files with 6 additions and 3 deletions

View file

@ -68,6 +68,10 @@ vars:
# New Dash First Invoicing Date. This is the first date considered for New Dash invoicing.
"new_dash_first_invoicing_date": "'2024-12-31'"
# The timestamp of when the Guest Squad activated the Feature Flag that
# activated the big bang refactor of the Guest Products logic.
"guest_products_feature_flag_activation_timestamp": "'2025-06-08T00:00:00Z'"
# A distant future date to use as a default when cutoff values are missing.
"end_of_time": "'2050-12-31'"

View file

@ -1,5 +1,4 @@
{% set check_in_cover_as_id_verification_payment = "5" %}
{% set cut_off_date_check_in_cover_as_id_verification_payment = "'2025-06-08'" %}
{{ config(materialized="table") }}
with
@ -8,7 +7,7 @@ with
from {{ ref("stg_core__verification_to_payment") }}
where
created_date_utc
<= date({{ cut_off_date_check_in_cover_as_id_verification_payment }})
<= date({{ var("guest_products_feature_flag_activation_timestamp") }})
and id_verification_payment_type
= {{ check_in_cover_as_id_verification_payment }}
),
@ -20,7 +19,7 @@ with
from {{ ref("stg_core__verification") }}
where
created_date_utc
<= date({{ cut_off_date_check_in_cover_as_id_verification_payment }})
<= date({{ var("guest_products_feature_flag_activation_timestamp") }})
),
stg_core__verification_request as (
select * from {{ ref("stg_core__verification_request") }}