change "tests:" to "data_tests:"

This commit is contained in:
Pablo Martin 2025-01-13 16:00:35 +01:00
parent db1edf7a1c
commit c3c628aec4
29 changed files with 1565 additions and 1565 deletions

View file

@ -6,7 +6,7 @@ models:
Records of verification requests from the Screen and Protect API. The
table tracks verification requests, their outcomes, and related metadata
about guests, listings, and partners.
tests:
data_tests:
- at_least_one_null:
columns:
- monthly_volume_discount
@ -15,20 +15,20 @@ models:
- name: id_verification
data_type: text
description: Unique identifier for the verification request.
tests:
data_tests:
- unique
- not_null
- name: id_booking
data_type: text
description: Unique identifier for the booking associated with the verification.
tests:
data_tests:
- not_null
- name: id_user_partner
data_type: text
description: Identifier for the partner user initiating the verification.
tests:
data_tests:
- not_null
- name: id_accommodation
@ -39,7 +39,7 @@ models:
data_type: bigint
description: "Id of the currency, works as a foreign key to the
currency table"
tests:
data_tests:
- not_null
- relationships:
to: ref('stg_core__currency')
@ -49,13 +49,13 @@ models:
data_type: boolean
description: |
Indicates if the booking is protected or not.
tests:
data_tests:
- not_null
- name: protection_type
data_type: text
description: Specific protection type for the request.
tests:
data_tests:
- not_null
- accepted_values:
values:
@ -70,7 +70,7 @@ models:
description: Field used for protection type "STANDALONE PROTECTION" to
indicate the starting level of protection.
In local currency.
tests:
data_tests:
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0
max_value: 100000
@ -81,7 +81,7 @@ models:
description: Field used for protection type "SCREEN & PROTECT",
"BASIC PROTECTION" or "DAMAGE WAIVER" to show the basic amount of protection.
In local currency.
tests:
data_tests:
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0
max_value: 100000
@ -92,7 +92,7 @@ models:
description: Field used for protection type "SCREEN & PROTECT",
or "STANDALONE PROTECTION" to show the basic amount of protection.
In local currency.
tests:
data_tests:
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0
max_value: 50000000
@ -105,7 +105,7 @@ models:
- name: verification_status
data_type: text
description: Outcome of the verification process.
tests:
data_tests:
- not_null
- accepted_values:
values:
@ -117,7 +117,7 @@ models:
data_type: numeric
description: The percentage or value of the price increase
applied to the user's account.
tests:
data_tests:
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0
strictly: true
@ -126,7 +126,7 @@ models:
data_type: date
description: The date when the price increase becomes effective.
This is the first day of the month.
tests:
data_tests:
- is_first_day_of_month
- name: monthly_volume_discount
@ -134,7 +134,7 @@ models:
description: The discount percentage or value offered based on the
volume of bookings achieved within a month.
No user can have more than one discount per month.
tests:
data_tests:
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0
max_value: 100
@ -144,7 +144,7 @@ models:
data_type: numeric
description: The minimum number of bookings required to qualify for
the monthly volume discount.
tests:
data_tests:
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0
strictly: true
@ -153,14 +153,14 @@ models:
data_type: date
description: The date when the monthly volume discount period begins.
This is the first day of the month.
tests:
data_tests:
- is_first_day_of_month
- name: monthly_volume_discount_end_date_utc
data_type: date
description: The date when the monthly volume discount period ends.
This is the last day of the month.
tests:
data_tests:
- is_last_day_of_month
- name: monthly_general_discount
@ -168,7 +168,7 @@ models:
description: The general discount percentage or value applied to all
bookings within the applicable period.
No user can have more than one discount per month.
tests:
data_tests:
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0
max_value: 100
@ -178,14 +178,14 @@ models:
data_type: date
description: The date when the general discount period begins.
This is the first day of the month.
tests:
data_tests:
- is_first_day_of_month
- name: monthly_general_discount_end_date_utc
data_type: date
description: The date when the general discount period ends.
This is the last day of the month.
tests:
data_tests:
- is_last_day_of_month
- name: verification_status_reason
@ -203,7 +203,7 @@ models:
- name: watch_list
data_type: text
description: Indicates if the guest was flagged on a watchlist.
tests:
data_tests:
- accepted_values:
values:
- "MATCH"
@ -228,13 +228,13 @@ models:
- name: is_cancelled
data_type: boolean
description: Indicates if the booking was canceled.
tests:
data_tests:
- not_null
- name: cancelled_at_utc
data_type: timestamp without time zone
description: Timestamp when the booking was canceled.
tests:
data_tests:
- not_null:
where: is_cancelled = true
@ -297,44 +297,44 @@ models:
- name: status_updated_at_utc
data_type: timestamp without time zone
description: Timestamp of the last status update for the verification.
tests:
data_tests:
- not_null
- name: status_updated_date_utc
data_type: date
description: Date of the last status update for the verification.
tests:
data_tests:
- not_null
- name: updated_at_utc
data_type: timestamp without time zone
description: Timestamp of the last update to the record.
tests:
data_tests:
- not_null
- name: updated_date_utc
data_type: date
description: Date of the last update to the record.
tests:
data_tests:
- not_null
- name: creation_at_utc
data_type: timestamp without time zone
description: |
Timestamp of when the reservation was created.
tests:
data_tests:
- not_null
- name: creation_date_utc
data_type: date
description: |
Date of when the reservation was created.
tests:
data_tests:
- not_null
- name: cosmos_created_date_utc
data_type: date
description: |
Date of when the verification request was created in Cosmos DB.
tests:
data_tests:
- not_null