diff --git a/dbt_project.yml b/dbt_project.yml index f92b14c..94fd499 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -65,6 +65,9 @@ vars: # KPIs Start Date. This is the date from which we start calculating KPIs. "kpis_start_date": "'2022-04-01'" + # A distant future date to use as a default when cutoff values are missing. + "end_of_time": "'2050-12-31'" + # Booking state variables # States should be strings in capital letters. Models need to force an upper() "cancelled_booking_state": "'CANCELLED'" diff --git a/models/intermediate/core/int_core__new_dash_services_offered.sql b/models/intermediate/core/int_core__new_dash_services_offered.sql index 829194e..33bcbc1 100644 --- a/models/intermediate/core/int_core__new_dash_services_offered.sql +++ b/models/intermediate/core/int_core__new_dash_services_offered.sql @@ -55,7 +55,7 @@ with int_core__accommodation_to_product_bundle apb on apb.id_user_product_bundle = bs.id_user_product_bundle and now() between apb.original_starts_at_utc and coalesce( - apb.original_ends_at_utc, '2050-12-31' + apb.original_ends_at_utc, {{ var("end_of_time") }} ) left join int_core__accommodation a on apb.id_accommodation = a.id_accommodation inner join int_core__new_dash_users ndu on bs.id_user_host = ndu.id_user_host