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

@ -43,30 +43,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.
indicate the starting 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_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

@ -22,7 +22,7 @@ with
then null
else {{ adapter.quote("documents") }} ->> 'ProtectionStartingLevel'
end as decimal(19, 4)
) as protection_starting_level,
) as protection_starting_amount_in_local_currency,
cast(
case
when
@ -31,7 +31,7 @@ with
then null
else {{ adapter.quote("documents") }} ->> 'ProtectionBasicAmount'
end as decimal(19, 4)
) as protection_basic_amount,
) as protection_basic_amount_in_local_currency,
cast(
case
when
@ -40,7 +40,7 @@ with
then null
else {{ adapter.quote("documents") }} ->> 'ProtectionExtendedAmount'
end as decimal(19, 4)
) as protection_extended_amount,
) as protection_extended_amount_in_local_currency,
({{ adapter.quote("documents") }} ->> 'PetProtection')::boolean
as pet_protection,
upper({{ adapter.quote("documents") }} ->> 'Status') as verification_status,