Final clarifications
This commit is contained in:
parent
0b6612f25b
commit
1f683ec651
6 changed files with 132 additions and 26 deletions
|
|
@ -43,17 +43,35 @@ models:
|
|||
- "DAMAGE WAIVER"
|
||||
- "PET PROTECTION"
|
||||
|
||||
- name: protection_basic_amount
|
||||
- name: protection_starting_level
|
||||
data_type: numeric
|
||||
description: Basic protection amount for the booking.
|
||||
description: Field used for protection type "STANDALONE PROTECTION" to
|
||||
indicate the starting level of protection.
|
||||
tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
max_value: 100000
|
||||
strictly: true
|
||||
|
||||
- name: protection_basic_amount
|
||||
data_type: numeric
|
||||
description: Field used for protection type "SCREEN & PROTECT",
|
||||
"BASIC PROTECTION" or "DAMAGE WAIVER" to show the basic amount of protection.
|
||||
tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
max_value: 100000
|
||||
strictly: true
|
||||
|
||||
- name: protection_extended_amount
|
||||
data_type: numeric
|
||||
description: Extended protection amount for the booking.
|
||||
description: Field used for protection type "SCREEN & PROTECT",
|
||||
or "STANDALONE PROTECTION" to show the basic amount of protection.
|
||||
tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
max_value: 50000000
|
||||
strictly: true
|
||||
|
||||
- name: pet_protection
|
||||
data_type: boolean
|
||||
|
|
@ -196,15 +214,24 @@ models:
|
|||
tests:
|
||||
- not_null
|
||||
|
||||
- name: created_at_utc
|
||||
- name: cosmos_creation_at_utc
|
||||
data_type: timestamp without time zone
|
||||
description: Internal timestamp when the record was created.
|
||||
description: |
|
||||
Timestamp of when the verification request was created in Cosmos DB.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: cosmos_creation_date_utc
|
||||
data_type: date
|
||||
description: |
|
||||
Date of when the verification request was created in Cosmos DB.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: created_date_utc
|
||||
data_type: date
|
||||
description: Internal date when the record was created.
|
||||
description: |
|
||||
Date when the reservation was created.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
|
|
|
|||
|
|
@ -15,12 +15,31 @@ with
|
|||
{{ adapter.quote("documents") }} ->> 'ProtectionType'
|
||||
) as protection_type,
|
||||
cast(
|
||||
{{ adapter.quote("documents") }}
|
||||
->> 'ProtectionBasicAmount' as decimal(19, 4)
|
||||
case
|
||||
when
|
||||
{{ adapter.quote("documents") }} ->> 'ProtectionStartingLevel'
|
||||
= ''
|
||||
then null
|
||||
else {{ adapter.quote("documents") }} ->> 'ProtectionStartingLevel'
|
||||
end as decimal(19, 4)
|
||||
) as protection_starting_level,
|
||||
cast(
|
||||
case
|
||||
when
|
||||
{{ adapter.quote("documents") }} ->> 'ProtectionBasicAmount'
|
||||
= ''
|
||||
then null
|
||||
else {{ adapter.quote("documents") }} ->> 'ProtectionBasicAmount'
|
||||
end as decimal(19, 4)
|
||||
) as protection_basic_amount,
|
||||
cast(
|
||||
{{ adapter.quote("documents") }}
|
||||
->> 'ProtectionExtendedAmount' as decimal(19, 4)
|
||||
case
|
||||
when
|
||||
{{ adapter.quote("documents") }} ->> 'ProtectionExtendedAmount'
|
||||
= ''
|
||||
then null
|
||||
else {{ adapter.quote("documents") }} ->> 'ProtectionExtendedAmount'
|
||||
end as decimal(19, 4)
|
||||
) as protection_extended_amount,
|
||||
({{ adapter.quote("documents") }} ->> 'PetProtection')::boolean
|
||||
as pet_protection,
|
||||
|
|
@ -66,9 +85,11 @@ with
|
|||
as updated_at_utc,
|
||||
({{ adapter.quote("documents") }} ->> 'UpdatedDate')::date
|
||||
as updated_date_utc,
|
||||
({{ adapter.quote("documents") }} ->> 'CreatedDate')::timestamp
|
||||
as created_at_utc,
|
||||
({{ adapter.quote("documents") }} ->> 'CreationDate')::timestamp
|
||||
as cosmos_creation_at_utc,
|
||||
({{ adapter.quote("documents") }} ->> 'CreationDate')::date
|
||||
as cosmos_creation_date_utc,
|
||||
({{ adapter.quote("documents") }} ->> 'CreatedDate')::date
|
||||
as created_date_utc,
|
||||
to_timestamp(
|
||||
(({{ adapter.quote("documents") }} ->> '_ts'))::integer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue