Simplify PR

This commit is contained in:
Joaquin Ossa 2024-12-20 14:03:58 +01:00
parent 79b408f3d2
commit 19d883ccd7
9 changed files with 52 additions and 209 deletions

View file

@ -50,30 +50,33 @@ models:
- "DAMAGE WAIVER"
- "PET PROTECTION"
- name: protection_starting_level
- name: protection_starting_amount_in_local_currency
data_type: numeric
description: Field used for protection type "STANDALONE PROTECTION" to
indicate the starting level of protection.
In local currency.
tests:
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0
max_value: 100000
strictly: true
- name: protection_basic_amount
- name: protection_basic_amount_in_local_currency
data_type: numeric
description: Field used for protection type "SCREEN & PROTECT",
"BASIC PROTECTION" or "DAMAGE WAIVER" to show the basic amount of protection.
In local currency.
tests:
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0
max_value: 100000
strictly: true
- name: protection_extended_amount
- name: protection_extended_amount_in_local_currency
data_type: numeric
description: Field used for protection type "SCREEN & PROTECT",
or "STANDALONE PROTECTION" to show the basic amount of protection.
In local currency.
tests:
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0

View file

@ -3,17 +3,18 @@ with
select * from {{ ref("int_screen_and_protect__verification_requests") }}
)
select
-- note that these ids are not the same as the ones found in Core DWH
-- they are completely unrelated
id_verification as id_verification,
id_booking as id_booking,
id_user_partner as id_user_partner,
id_accommodation as id_accommodation,
is_protected as is_protected,
protection_type as protection_type,
protection_starting_level as protection_starting_level,
protection_basic_amount as protection_basic_amount,
protection_extended_amount as protection_extended_amount,
protection_starting_amount_in_local_currency
as protection_starting_amount_in_local_currency,
protection_basic_amount_in_local_currency
as protection_basic_amount_in_local_currency,
protection_extended_amount_in_local_currency
as protection_extended_amount_in_local_currency,
pet_protection as pet_protection,
verification_status as verification_status,
verification_status_reason as verification_status_reason,