change "tests:" to "data_tests:"
This commit is contained in:
parent
db1edf7a1c
commit
c3c628aec4
29 changed files with 1565 additions and 1565 deletions
|
|
@ -10,7 +10,7 @@ models:
|
|||
- name: id_verification
|
||||
data_type: text
|
||||
description: "unique Superhog generated id for this verification"
|
||||
tests:
|
||||
data_tests:
|
||||
- unique
|
||||
- not_null
|
||||
|
||||
|
|
@ -19,7 +19,7 @@ models:
|
|||
description: "unique Superhog generated id for a booking.
|
||||
note that this could be duplicated and both will be charged,
|
||||
it's up to the user to not generate or cancel duplicate verifications"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: verification_status
|
||||
|
|
@ -29,13 +29,13 @@ models:
|
|||
- name: is_cancelled
|
||||
data_type: boolean
|
||||
description: "indicates if the booking has been cancelled or not."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: ok_status_fee_in_gbp
|
||||
data_type: integer
|
||||
description: "total fee charged on checkout, this is only charged for approved verifications"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
|
|
@ -45,11 +45,11 @@ models:
|
|||
- name: created_date_utc
|
||||
data_type: date
|
||||
description: "Date of creation of the verification in the system"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: checkout_date_utc
|
||||
data_type: date
|
||||
description: "Date of checkout for the booking"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
|
|
|||
|
|
@ -9,26 +9,26 @@ models:
|
|||
- name: id_record
|
||||
data_type: text
|
||||
description: Unique identifier for the record.
|
||||
tests:
|
||||
data_tests:
|
||||
- unique
|
||||
- not_null
|
||||
|
||||
- name: id_user_partner
|
||||
data_type: text
|
||||
description: Identifier for the partner user associated with the check-in.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: id_reservation
|
||||
data_type: text
|
||||
description: Unique identifier for the reservation associated with the check-in.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: id_accommodation
|
||||
data_type: text
|
||||
description: Unique identifier for the accommodation associated with the reservation.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: guest_last_name
|
||||
|
|
@ -54,7 +54,7 @@ models:
|
|||
- name: reservation_total_amount_in_local_currency
|
||||
data_type: numeric
|
||||
description: Total cost amount in guest currency for the reservation.
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
strictly: true
|
||||
|
|
@ -63,19 +63,19 @@ models:
|
|||
data_type: text
|
||||
description: |
|
||||
Currency ISO code used by guest for the reservation.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: channel
|
||||
data_type: text
|
||||
description: Booking channel or source.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: checkin_date_utc
|
||||
data_type: date
|
||||
description: Check-in date for the booking.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: checkin_time_utc
|
||||
|
|
@ -85,13 +85,13 @@ models:
|
|||
- name: checkout_date_utc
|
||||
data_type: date
|
||||
description: Check-out date for the booking.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: number_of_nights
|
||||
data_type: integer
|
||||
description: Number of nights for the reservation.
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 1
|
||||
|
||||
|
|
@ -130,29 +130,29 @@ models:
|
|||
- 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: cosmos_creation_at_utc
|
||||
data_type: timestamp without time zone
|
||||
description: Timestamp when the record was created in Cosmos DB.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: cosmos_creation_date_utc
|
||||
data_type: date
|
||||
description: Date when the record was created in Cosmos DB.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: created_date_utc
|
||||
data_type: date
|
||||
description: Date when the record was created.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ models:
|
|||
- name: id_payment
|
||||
data_type: bigint
|
||||
description: Superhog id for this Payment.
|
||||
tests:
|
||||
data_tests:
|
||||
- unique
|
||||
- not_null
|
||||
|
||||
|
|
@ -30,13 +30,13 @@ models:
|
|||
- name: payment_due_at_utc
|
||||
data_type: timestamp without time zone
|
||||
description: The point in time at which this payment had to be paid.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: payment_due_date_utc
|
||||
data_type: date
|
||||
description: The date on which this payment had to be paid.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: payment_paid_at_utc
|
||||
|
|
@ -88,13 +88,13 @@ models:
|
|||
- name: id_guest_user
|
||||
data_type: character varying
|
||||
description: The UUID of the guest user in the Superhog backend.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: id_verification
|
||||
data_type: bigint
|
||||
description: The ID of the verification that generated this payment.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: verification_payment_type
|
||||
|
|
@ -104,7 +104,7 @@ models:
|
|||
- name: amount_in_txn_currency
|
||||
data_type: numeric
|
||||
description: The payment amount in the currency in which the transaction actually happened. If the guest paid in Australian Dollars, this is measured in AUD. (To be decommissioned)
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
strictly: false
|
||||
|
|
@ -112,13 +112,13 @@ models:
|
|||
- name: currency
|
||||
data_type: character varying
|
||||
description: The currency in which the transaction actually happened. If the guest paid in Australian Dollars, this is measured in AUD.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: amount_in_gbp
|
||||
data_type: numeric
|
||||
description: The payment amount value, converted to GBP, using the exchange rate for the day on which the payment happened.
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
strictly: false
|
||||
|
|
@ -126,7 +126,7 @@ models:
|
|||
- name: payment_status
|
||||
data_type: character varying
|
||||
description: "The status of the payment. It can be one of: Paid, Refunded, Refund Failed, Cancelled, Paid Manually, Unpaid."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: notes
|
||||
|
|
@ -139,7 +139,7 @@ models:
|
|||
- name: total_amount_in_txn_currency
|
||||
data_type: numeric
|
||||
description: The payment amount in the currency in which the transaction actually happened. If the guest paid in Australian Dollars, this is measured in AUD.
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
strictly: false
|
||||
|
|
@ -147,7 +147,7 @@ models:
|
|||
- name: amount_without_taxes_in_txn_currency
|
||||
data_type: numeric
|
||||
description: The payment amount without taxes in the currency in which the transaction actually happened. If the guest paid in Australian Dollars, this is measured in AUD. (To be decommissioned)
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
strictly: false
|
||||
|
|
@ -155,7 +155,7 @@ models:
|
|||
- name: total_amount_in_gbp
|
||||
data_type: numeric
|
||||
description: The payment amount value, converted to GBP, using the exchange rate for the day on which the payment happened.
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
strictly: false
|
||||
|
|
@ -163,7 +163,7 @@ models:
|
|||
- name: amount_without_taxes_in_gbp
|
||||
data_type: numeric
|
||||
description: The payment amount value without taxes, converted to GBP, using the exchange rate for the day on which the payment happened.
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
strictly: false
|
||||
|
|
@ -185,7 +185,7 @@ models:
|
|||
- name: id_booking
|
||||
data_type: bigint
|
||||
description: The unique, Superhog generated id for this booking.
|
||||
tests:
|
||||
data_tests:
|
||||
- unique
|
||||
- not_null
|
||||
|
||||
|
|
@ -253,7 +253,7 @@ models:
|
|||
description: |
|
||||
Unique, incremental, internal ID for the related verification
|
||||
request.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- unique
|
||||
|
||||
|
|
@ -632,7 +632,7 @@ models:
|
|||
- name: id_user
|
||||
data_type: character varying
|
||||
description: Unique, incremental, internal ID for the user.
|
||||
tests:
|
||||
data_tests:
|
||||
- unique
|
||||
- not_null
|
||||
|
||||
|
|
@ -795,7 +795,7 @@ models:
|
|||
- name: id_user_host
|
||||
data_type: character varying
|
||||
description: Unique id value for the user
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- unique
|
||||
|
||||
|
|
@ -853,7 +853,7 @@ models:
|
|||
- name: id_verification_request
|
||||
data_type: bigint
|
||||
description: Unique id value for the verification request
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- unique
|
||||
|
||||
|
|
@ -871,7 +871,7 @@ models:
|
|||
- PMS
|
||||
- OSL
|
||||
- API/MANUAL
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
|
|
@ -944,7 +944,7 @@ models:
|
|||
- name: id_user_host
|
||||
data_type: character varying
|
||||
description: Unique id value for the user
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: id_deal
|
||||
|
|
@ -994,7 +994,7 @@ models:
|
|||
- name: id_accommodation
|
||||
data_type: bigint
|
||||
description: "Id of the accommodation or listing. It's the unique key for this model."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- unique
|
||||
|
||||
|
|
@ -1037,7 +1037,7 @@ models:
|
|||
- name: id_booking
|
||||
data_type: bigint
|
||||
description: "The unique, Superhog generated id for this booking."
|
||||
tests:
|
||||
data_tests:
|
||||
- unique
|
||||
- not_null
|
||||
|
||||
|
|
@ -1048,7 +1048,7 @@ models:
|
|||
- name: id_user_host
|
||||
data_type: character varying
|
||||
description: The UUID of the Superhog user playing the host role in the booking.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: id_accommodation
|
||||
|
|
@ -1066,7 +1066,7 @@ models:
|
|||
- NoFlags
|
||||
- Flagged
|
||||
- IncompleteInformation"
|
||||
tests:
|
||||
data_tests:
|
||||
- accepted_values:
|
||||
values:
|
||||
- "Approved"
|
||||
|
|
@ -1129,7 +1129,7 @@ models:
|
|||
description: |
|
||||
The unique identifier of this table. It corresponds to the host users
|
||||
that have been migrated to the New Dashboard.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- unique
|
||||
|
||||
|
|
@ -1142,7 +1142,7 @@ models:
|
|||
description: |
|
||||
The migration phase in which this user was migrated, for informative
|
||||
purposes.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: has_user_moved_from_old_dash
|
||||
|
|
@ -1155,7 +1155,7 @@ models:
|
|||
data_type: date
|
||||
description: |
|
||||
The estimated date in which this user was migrated.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: company_name
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ models:
|
|||
- name: id_verification
|
||||
data_type: text
|
||||
description: "unique Superhog generated id for this verification"
|
||||
tests:
|
||||
data_tests:
|
||||
- unique
|
||||
- not_null
|
||||
|
||||
|
|
@ -21,19 +21,19 @@ models:
|
|||
description: "unique Superhog generated id for a booking.
|
||||
note that there might be duplicate bookings on the original data
|
||||
but we remove them keeping only the verification with the most recent update."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: id_user_partner
|
||||
data_type: text
|
||||
description: "unique Superhog generated id for partner"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: id_accommodation
|
||||
data_type: text
|
||||
description: "unique Superhog generated id for a listing"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: listing_town
|
||||
|
|
@ -63,7 +63,7 @@ models:
|
|||
- name: currency
|
||||
data_type: text
|
||||
description: "currency in which the transaction actually happened"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: nightly_fee_local
|
||||
|
|
@ -77,7 +77,7 @@ models:
|
|||
- name: ok_status_fee_in_txn_currency
|
||||
data_type: numeric
|
||||
description: "fee charged in used currency for approved or flagged verifications and not cancelled"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
|
|
@ -86,7 +86,7 @@ models:
|
|||
- name: ok_status_fee_in_gbp
|
||||
data_type: numeric
|
||||
description: "fee charged in gbp for approved or flagged verifications and not cancelled"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
|
|
@ -95,7 +95,7 @@ models:
|
|||
- name: rejected_fee_in_txn_currency
|
||||
data_type: numeric
|
||||
description: "fee charged in used currency for rejected verifications"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
|
|
@ -104,7 +104,7 @@ models:
|
|||
- name: rejected_fee_in_gbp
|
||||
data_type: numeric
|
||||
description: "fee charged in gbp for rejected verifications"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
|
|
@ -113,7 +113,7 @@ models:
|
|||
- name: cancelled_fee_in_txn_currency
|
||||
data_type: numeric
|
||||
description: "fee charged in used currency for cancelled verifications"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
|
|
@ -122,7 +122,7 @@ models:
|
|||
- name: cancelled_fee_in_gbp
|
||||
data_type: numeric
|
||||
description: "fee charged in gbp for cancelled verifications"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
|
|
@ -131,7 +131,7 @@ models:
|
|||
- name: created_date_utc
|
||||
data_type: date
|
||||
description: "Date of creation of the verification in the system"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: cancelled_date_utc
|
||||
|
|
@ -141,11 +141,11 @@ models:
|
|||
- name: checkin_date_utc
|
||||
data_type: date
|
||||
description: "Date of checkin for the booking"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: checkout_date_utc
|
||||
data_type: date
|
||||
description: "Date of checkout for the booking"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
|
|
|||
|
|
@ -203,18 +203,18 @@ models:
|
|||
description: A unique ID for the record, derived from concatenating the
|
||||
currencies, date, source and version. Currency order is relevant
|
||||
(EURUSD != USDEUR).
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- unique
|
||||
- name: from_currency
|
||||
data_type: character
|
||||
description: The source currency, represented as an ISO 4217 code.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- name: to_currency
|
||||
data_type: character
|
||||
description: The target currency, represented as an ISO 4217 code.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- name: rate
|
||||
data_type: numeric
|
||||
|
|
@ -228,13 +228,13 @@ models:
|
|||
always be one.
|
||||
|
||||
The rate can be smaller than one, but can't be negative.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_negative_or_zero
|
||||
- not_null
|
||||
- name: rate_date_utc
|
||||
data_type: date
|
||||
description: The date in which the rate record is relevant.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- name: source
|
||||
data_type: text
|
||||
|
|
@ -249,7 +249,7 @@ models:
|
|||
in nature) or `guess` (the rate sits in the past and is a guess in
|
||||
nature). Note that one currency pair can have multiple rate versions
|
||||
on the same date.
|
||||
tests:
|
||||
data_tests:
|
||||
- accepted_values:
|
||||
values:
|
||||
- guess
|
||||
|
|
@ -262,7 +262,7 @@ models:
|
|||
For external sources, this will be the point in time when the
|
||||
information was obtained from them. For stuff we make up here in the
|
||||
DWH, this will be the point in time when we made the assumption.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: simple_exchange_rates
|
||||
|
|
@ -274,7 +274,7 @@ models:
|
|||
The time granularity is daily. Each record holds a currency pair for a
|
||||
specific day. You will only find one conversion rate per currency pair and
|
||||
date.
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- from_currency
|
||||
|
|
@ -284,22 +284,22 @@ models:
|
|||
- name: from_currency
|
||||
data_type: character
|
||||
description: The source currency, represented as an ISO 4217 code.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- name: to_currency
|
||||
data_type: character
|
||||
description: The source currency, represented as an ISO 4217 code.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- name: rate
|
||||
data_type: numeric
|
||||
description: The target currency, represented as an ISO 4217 code.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- name: rate_date_utc
|
||||
data_type: date
|
||||
description: The date in which the rate record is relevant.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- name: updated_at_utc
|
||||
data_type: timestamp with time zone
|
||||
|
|
@ -307,7 +307,7 @@ models:
|
|||
For external sources, this will be the point in time when the
|
||||
information was obtained from them. For stuff we make up here in the
|
||||
DWH, this will be the point in time when we made the assumption.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: mtd_aggregated_metrics
|
||||
|
|
@ -317,7 +317,7 @@ models:
|
|||
It's the main source of information for the Main KPIs reporting, specifically
|
||||
on the MTD (Month To Date) and the Monthly Overview.
|
||||
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- date
|
||||
|
|
@ -329,25 +329,25 @@ models:
|
|||
- name: year
|
||||
data_type: int
|
||||
description: Year number of the given date.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: month
|
||||
data_type: int
|
||||
description: Month number of the given date.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: day
|
||||
data_type: int
|
||||
description: Day monthly number of the given date.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: is_end_of_month
|
||||
data_type: boolean
|
||||
description: Is end of month, 1 for yes, 0 for no.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: is_current_month
|
||||
|
|
@ -355,7 +355,7 @@ models:
|
|||
description: |
|
||||
Checks if the date is within the current executed month,
|
||||
1 for yes, 0 for no.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: is_end_of_month_or_yesterday
|
||||
|
|
@ -363,7 +363,7 @@ models:
|
|||
description: |
|
||||
Checks if the date is end of month or yesterday,
|
||||
1 for yes, 0 for no.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: first_day_month
|
||||
|
|
@ -371,7 +371,7 @@ models:
|
|||
description: |
|
||||
First day of the month corresponding to the date field.
|
||||
It comes from int_dates_mtd logic.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: date
|
||||
|
|
@ -379,7 +379,7 @@ models:
|
|||
description: |
|
||||
Main date for the computation, that is used for filters.
|
||||
It comes from int_dates_mtd logic.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- latest_date_is_yesterday
|
||||
|
||||
|
|
@ -391,13 +391,13 @@ models:
|
|||
dimension_display; this is, the name of the dimension for
|
||||
displaying purposes.
|
||||
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: dimension_value
|
||||
data_type: string
|
||||
description: The value or segment available for the selected dimension.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: previous_year_date
|
||||
|
|
@ -410,7 +410,7 @@ models:
|
|||
- name: metric
|
||||
data_type: text
|
||||
description: Name of the business metric.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: order_by
|
||||
|
|
@ -422,7 +422,7 @@ models:
|
|||
- name: number_format
|
||||
data_type: text
|
||||
description: Allows for grouping and formatting for displaying purposes.
|
||||
tests:
|
||||
data_tests:
|
||||
- accepted_values:
|
||||
values:
|
||||
[
|
||||
|
|
@ -475,7 +475,7 @@ models:
|
|||
enforces that a booking/guest journey/listing/etc has a host with a deal assigned, which is
|
||||
not necessarily the case.
|
||||
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- date
|
||||
|
|
@ -485,20 +485,20 @@ models:
|
|||
- name: date
|
||||
data_type: date
|
||||
description: The last day of the month for historic metrics.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: id_deal
|
||||
data_type: character varying
|
||||
description: Id of the deal associated to the host.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: main_deal_name
|
||||
data_type: string
|
||||
description: |
|
||||
Main name for this ID deal.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: main_billing_country_iso_3_per_deal
|
||||
|
|
@ -510,19 +510,19 @@ models:
|
|||
- name: year
|
||||
data_type: int
|
||||
description: year number of the given date.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: month
|
||||
data_type: int
|
||||
description: month number of the given date.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: day
|
||||
data_type: int
|
||||
description: day monthly number of the given date.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: monthly_growth_score_by_deal
|
||||
|
|
@ -562,7 +562,7 @@ models:
|
|||
Lastly, this model provides informative date fields, deal attributes, absolute
|
||||
metric values and MoM & YoY relative incrementals to enrich reporting.
|
||||
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- date
|
||||
|
|
@ -575,7 +575,7 @@ models:
|
|||
Date corresponding to the last day of the month. Given month
|
||||
metrics are inclusive to this date. Together with id_deal, it
|
||||
acts as the primary key of this model.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: id_deal
|
||||
|
|
@ -583,21 +583,21 @@ models:
|
|||
description: |
|
||||
Unique identifier of a Deal. Together with date, it acts as
|
||||
the primary key of this model.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: main_deal_name
|
||||
data_type: string
|
||||
description: |
|
||||
Main name for a Deal, representing the client.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: has_active_pms
|
||||
data_type: boolean
|
||||
description: |
|
||||
Does the deal have an active associated PMS.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: active_pms_list
|
||||
|
|
@ -646,7 +646,7 @@ models:
|
|||
Informative field. It indicates the first day of the
|
||||
month corresponding to date.
|
||||
If date = 2024-09-30, this field will be 2024-09-01.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: previous_1_month_first_day_month
|
||||
|
|
@ -716,7 +716,7 @@ models:
|
|||
for a specific deal. This value corresponds to
|
||||
the given month. This value can be negative,
|
||||
but not null.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: previous_1_month_revenue_in_gbp
|
||||
|
|
@ -767,7 +767,7 @@ models:
|
|||
the previous month.
|
||||
It can be null if any revenue used in the computation
|
||||
is null or it's negative.
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: -1
|
||||
strictly: false
|
||||
|
|
@ -781,7 +781,7 @@ models:
|
|||
It can be null if any revenue used in the computation
|
||||
is null or it's negative.
|
||||
This field is used for the growth score computation.
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: -1
|
||||
strictly: false
|
||||
|
|
@ -794,7 +794,7 @@ models:
|
|||
months ago.
|
||||
It can be null if any revenue used in the computation
|
||||
is null or it's negative.
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: -1
|
||||
strictly: false
|
||||
|
|
@ -808,7 +808,7 @@ models:
|
|||
It can be null if any revenue used in the computation
|
||||
is null or it's negative.
|
||||
This field is used for the growth score computation.
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: -1
|
||||
strictly: false
|
||||
|
|
@ -819,7 +819,7 @@ models:
|
|||
Monthly value representing created bookings
|
||||
for a specific deal. This value corresponds to
|
||||
the given month. This value cannot be null.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
|
|
@ -833,7 +833,7 @@ models:
|
|||
the previous month.
|
||||
This value can be null, thus indicating that no
|
||||
history is available.
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
strictly: false
|
||||
|
|
@ -846,7 +846,7 @@ models:
|
|||
monthly amount generated 12 months ago.
|
||||
This value can be null, thus indicating that no
|
||||
history is available.
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
strictly: false
|
||||
|
|
@ -860,7 +860,7 @@ models:
|
|||
It can be null if the bookings created in the
|
||||
previous month are null.
|
||||
This field is used for the growth score computation.
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: -1
|
||||
strictly: false
|
||||
|
|
@ -874,7 +874,7 @@ models:
|
|||
It can be null if the bookings created 12 months
|
||||
ago are null.
|
||||
This field is used for the growth score computation.
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: -1
|
||||
strictly: false
|
||||
|
|
@ -885,7 +885,7 @@ models:
|
|||
Monthly value representing the listings booked in month
|
||||
for a specific deal. This value corresponds to
|
||||
the given month. This value cannot be null.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
|
|
@ -899,7 +899,7 @@ models:
|
|||
the previous month.
|
||||
This value can be null, thus indicating that no
|
||||
history is available.
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
strictly: false
|
||||
|
|
@ -912,7 +912,7 @@ models:
|
|||
monthly amount generated 12 months ago.
|
||||
This value can be null, thus indicating that no
|
||||
history is available.
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
strictly: false
|
||||
|
|
@ -926,7 +926,7 @@ models:
|
|||
It can be null if the listings booked in month in the
|
||||
previous month are null.
|
||||
This field is used for the growth score computation.
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: -1
|
||||
strictly: false
|
||||
|
|
@ -940,7 +940,7 @@ models:
|
|||
It can be null if the listings booked in month of 12
|
||||
months ago are null.
|
||||
This field is used for the growth score computation.
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: -1
|
||||
strictly: false
|
||||
|
|
@ -954,7 +954,7 @@ models:
|
|||
aggregated_revenue_to_first_day_month.
|
||||
It can be negative if the sum is negative.
|
||||
It cannot be null.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: effective_deal_revenue_12_months_window
|
||||
|
|
@ -968,7 +968,7 @@ models:
|
|||
thus this value should not be reported.
|
||||
It is used for the deal contribution share with respect
|
||||
to the global revenue. It cannot be null.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
|
|
@ -985,7 +985,7 @@ models:
|
|||
thus this value should not be reported.
|
||||
It is used for the deal contribution share with respect
|
||||
to the global revenue. It cannot be null.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
|
|
@ -997,7 +997,7 @@ models:
|
|||
Represents the size of the deal in terms of revenue. In
|
||||
other words, what's the percentage of the global revenue
|
||||
that can be attributed to this deal. It cannot be null.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
|
|
@ -1011,7 +1011,7 @@ models:
|
|||
If more than one deal have the same share, the order is
|
||||
not under control.
|
||||
It cannot be null.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: deal_created_bookings_12_months_window
|
||||
|
|
@ -1022,7 +1022,7 @@ models:
|
|||
aggregated_revenue_from_first_day_month to
|
||||
aggregated_revenue_to_first_day_month.
|
||||
It cannot be null.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
|
|
@ -1037,7 +1037,7 @@ models:
|
|||
aggregated_revenue_to_first_day_month.
|
||||
It is used for the deal contribution share with respect
|
||||
to the global created bookings. It cannot be null.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
|
|
@ -1050,7 +1050,7 @@ models:
|
|||
In other words, what's the percentage of the global created
|
||||
bookings that can be attributed to this deal.
|
||||
It cannot be null.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
|
|
@ -1064,7 +1064,7 @@ models:
|
|||
If more than one deal have the same share, the order is
|
||||
not under control.
|
||||
It cannot be null.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: deal_avg_listings_booked_in_month_12_months_window
|
||||
|
|
@ -1075,7 +1075,7 @@ models:
|
|||
aggregated_revenue_from_first_day_month to
|
||||
aggregated_revenue_to_first_day_month.
|
||||
It cannot be null.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
|
|
@ -1091,7 +1091,7 @@ models:
|
|||
It is used for the deal contribution share with respect
|
||||
to the global average listings booked in month.
|
||||
It cannot be null.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
|
|
@ -1105,7 +1105,7 @@ models:
|
|||
In other words, what's the percentage of the global average listings
|
||||
booked in month that can be attributed to this deal.
|
||||
It cannot be null.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
|
|
@ -1119,7 +1119,7 @@ models:
|
|||
If more than one deal have the same share, the order is
|
||||
not under control.
|
||||
It cannot be null.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: avg_mom_growth_score
|
||||
|
|
@ -1130,7 +1130,7 @@ models:
|
|||
MoM shifted by one month of revenue.
|
||||
It indicates the tendency of growth of the deal without
|
||||
taking into account its revenue size. It cannot be null.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: avg_yoy_growth_score
|
||||
|
|
@ -1141,7 +1141,7 @@ models:
|
|||
YoY shifted by one month of revenue.
|
||||
It indicates the tendency of growth of the deal without
|
||||
taking into account its revenue size. It cannot be null.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: avg_growth_score
|
||||
|
|
@ -1152,7 +1152,7 @@ models:
|
|||
YoY and MoM shifted by one month of revenue.
|
||||
It indicates the tendency of growth of the deal without
|
||||
taking into account its revenue size. It cannot be null.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: weighted_avg_growth_score
|
||||
|
|
@ -1164,7 +1164,7 @@ models:
|
|||
It's the main indicator towards measuring both growth
|
||||
(if positive) or decay (if negative) while weighting
|
||||
the financial impact this deal tendency can have.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: categorisation_weighted_avg_growth_score
|
||||
|
|
@ -1175,7 +1175,7 @@ models:
|
|||
losers, flat, winners and top winners.
|
||||
Currently the categorisation is based on the score itself
|
||||
rather than selecting a top up/down.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
|
|
@ -1202,7 +1202,7 @@ models:
|
|||
description: |
|
||||
The identifier of the booking. Acts as Primary Key to this table.
|
||||
Cannot be null.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- unique
|
||||
|
||||
|
|
@ -1210,7 +1210,7 @@ models:
|
|||
data_type: string
|
||||
description: |
|
||||
Unique identifier of the account. It cannot be null.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: main_billing_country
|
||||
|
|
@ -1228,7 +1228,7 @@ models:
|
|||
This field should be modified at the moment we have
|
||||
a proper way to retrieve a common account name per deal.
|
||||
It can contain duplicates.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: hubspot_deal_name
|
||||
|
|
@ -1246,7 +1246,7 @@ models:
|
|||
data_type: string
|
||||
description: |
|
||||
The current status of the booking. Cannot be null.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: program_name
|
||||
|
|
@ -1254,7 +1254,7 @@ models:
|
|||
description: |
|
||||
The name of the program, or product bundle, applied to the booking.
|
||||
Cannot be null.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: booking_created_date_utc
|
||||
|
|
@ -1262,7 +1262,7 @@ models:
|
|||
description: |
|
||||
Date of when the Booking record was created in the Backend.
|
||||
Cannot be null.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: booking_check_in_date_utc
|
||||
|
|
@ -1270,14 +1270,14 @@ models:
|
|||
description: |
|
||||
Date of the Check-in of the Booking.
|
||||
Cannot be null.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: booking_check_out_date_utc
|
||||
data_type: date
|
||||
description: |
|
||||
Date of the Check-out of the Booking.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: booking_number_of_nights
|
||||
|
|
@ -1296,7 +1296,7 @@ models:
|
|||
description: |
|
||||
Specifies the New Dash Version in which these users were
|
||||
moved or joined.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: user_in_new_dash_since_date_utc
|
||||
|
|
@ -1350,7 +1350,7 @@ models:
|
|||
not necessarily mean that it won't be in the future. Similarly, if
|
||||
the booking is chargeable it does not necessarily mean that is actually
|
||||
charged. It cannot be null.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: is_booking_cancelled
|
||||
|
|
@ -1389,7 +1389,7 @@ models:
|
|||
additional metrics.
|
||||
The data is segmented by deal and time window for detailed analysis.
|
||||
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- date
|
||||
|
|
@ -1402,20 +1402,20 @@ models:
|
|||
description: |
|
||||
The last day of the month or yesterday for historic metrics.
|
||||
It's the same date as for KPIs related models.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: id_deal
|
||||
data_type: character varying
|
||||
description: Id of the deal associated to the host.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: time_window
|
||||
data_type: character varying
|
||||
description: |
|
||||
Identifier of the time window used for the aggregation of the metrics.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
|
|
@ -1445,14 +1445,14 @@ models:
|
|||
data_type: string
|
||||
description: |
|
||||
Main name for this ID deal.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: has_active_pms
|
||||
data_type: boolean
|
||||
description: |
|
||||
Does the deal have an active associated PMS.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: active_pms_list
|
||||
|
|
@ -1503,7 +1503,7 @@ models:
|
|||
Total amount of bookings created by the deal
|
||||
in the time window. It can be null if no bookings
|
||||
were created.
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
strictly: false
|
||||
|
|
@ -1514,7 +1514,7 @@ models:
|
|||
Average amount of listings booked in month by the deal
|
||||
in the time window. It can be null if no listings
|
||||
were booked.
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
strictly: false
|
||||
|
|
@ -1555,7 +1555,7 @@ models:
|
|||
Total amount of payments in GBP made by the guest
|
||||
in the time window. It can be null if no payments
|
||||
were made by the guest. It can be negative.
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
strictly: false
|
||||
|
|
@ -1574,7 +1574,7 @@ models:
|
|||
Total amount of resolution payments made to the host
|
||||
in the time window. It can be null if no resolution
|
||||
payments were made by the host.
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
strictly: false
|
||||
|
|
@ -1609,7 +1609,7 @@ models:
|
|||
- name: id_verification
|
||||
data_type: text
|
||||
description: "unique Superhog generated id for this verification"
|
||||
tests:
|
||||
data_tests:
|
||||
- unique
|
||||
- not_null
|
||||
|
||||
|
|
@ -1622,7 +1622,7 @@ models:
|
|||
- name: id_user_partner
|
||||
data_type: text
|
||||
description: "unique Superhog generated id for partner"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: id_accommodation
|
||||
|
|
@ -1632,7 +1632,7 @@ models:
|
|||
- name: version
|
||||
data_type: text
|
||||
description: "value to identify if it is Guesty (V1) or E-deposit (V2)"
|
||||
tests:
|
||||
data_tests:
|
||||
- accepted_values:
|
||||
values:
|
||||
- V1
|
||||
|
|
@ -1641,7 +1641,7 @@ models:
|
|||
- name: verification_source
|
||||
data_type: text
|
||||
description: "source of the verification for the booking"
|
||||
tests:
|
||||
data_tests:
|
||||
- accepted_values:
|
||||
values:
|
||||
- Guesty
|
||||
|
|
@ -1816,7 +1816,7 @@ models:
|
|||
- name: id_deal
|
||||
data_type: character varying
|
||||
description: "Unique ID for this deal."
|
||||
tests:
|
||||
data_tests:
|
||||
- unique
|
||||
- not_null
|
||||
|
||||
|
|
@ -1829,7 +1829,7 @@ models:
|
|||
description: "Count of distinct names the deal has in Core.
|
||||
It might be the case that a deal has ony NULL value for a name,
|
||||
so the count will be 0"
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
strictly: false
|
||||
|
|
@ -1843,7 +1843,7 @@ models:
|
|||
description: "Count of distinct names the deal has in Hubspot.
|
||||
It might be the case that a deal has ony NULL value for a name,
|
||||
so the count will be 0"
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
strictly: false
|
||||
|
|
@ -1857,7 +1857,7 @@ models:
|
|||
description: "Count of distinct names the deal has in Xero.
|
||||
It might be the case that a deal has ony NULL value for a name,
|
||||
so the count will be 0"
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
strictly: false
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ models:
|
|||
- has_id_check,
|
||||
- main_billing_country_iso_3_per_deal.
|
||||
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- date_day
|
||||
|
|
@ -27,13 +27,13 @@ models:
|
|||
- name: date_day
|
||||
data_type: date
|
||||
description: "Date of when Guest Journeys have been completed."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: date_week
|
||||
data_type: string
|
||||
description: "Week number of when Guest Journeys have been completed."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: py_date_day
|
||||
|
|
@ -45,7 +45,7 @@ models:
|
|||
- name: has_payment
|
||||
data_type: string
|
||||
description: Has there been any guest payments on the guest journey.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
|
|
@ -56,7 +56,7 @@ models:
|
|||
data_type: string
|
||||
description: Does the verification in the guest journey
|
||||
includes Government Id Check for the bookings.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
|
|
@ -67,7 +67,7 @@ models:
|
|||
data_type: string
|
||||
description: |
|
||||
Main billing country of the host.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: created_guest_journeys_not_cancelled
|
||||
|
|
@ -75,7 +75,7 @@ models:
|
|||
description: |
|
||||
Count of daily guest journeys created, excluding cancelled bookings,
|
||||
in a given date and per specified dimension.
|
||||
tests:
|
||||
data_tests:
|
||||
- kpis_daily_outlier_detector:
|
||||
column_name: created_guest_journeys_not_cancelled
|
||||
date_column: date_day
|
||||
|
|
@ -85,7 +85,7 @@ models:
|
|||
description: |
|
||||
Count of daily guest journeys started, excluding cancelled bookings,
|
||||
in a given date and per specified dimension.
|
||||
tests:
|
||||
data_tests:
|
||||
- kpis_daily_outlier_detector:
|
||||
column_name: started_guest_journeys_not_cancelled
|
||||
date_column: date_day
|
||||
|
|
@ -95,7 +95,7 @@ models:
|
|||
description: |
|
||||
Count of daily guest journeys completed, excluding cancelled bookings,
|
||||
in a given date and per specified dimension.
|
||||
tests:
|
||||
data_tests:
|
||||
- kpis_daily_outlier_detector:
|
||||
column_name: completed_guest_journeys_not_cancelled
|
||||
date_column: date_day
|
||||
|
|
@ -105,7 +105,7 @@ models:
|
|||
description: |
|
||||
Count of daily guest journeys created in a given date and
|
||||
per specified dimension.
|
||||
tests:
|
||||
data_tests:
|
||||
- kpis_daily_outlier_detector:
|
||||
column_name: created_guest_journeys
|
||||
date_column: date_day
|
||||
|
|
@ -115,7 +115,7 @@ models:
|
|||
description: |
|
||||
Count of daily guest journeys started in a given date and
|
||||
per specified dimension.
|
||||
tests:
|
||||
data_tests:
|
||||
- kpis_daily_outlier_detector:
|
||||
column_name: started_guest_journeys
|
||||
date_column: date_day
|
||||
|
|
@ -125,7 +125,7 @@ models:
|
|||
description: |
|
||||
Count of daily guest journeys completed in a given date and
|
||||
per specified dimension.
|
||||
tests:
|
||||
data_tests:
|
||||
- kpis_daily_outlier_detector:
|
||||
column_name: completed_guest_journeys
|
||||
date_column: date_day
|
||||
|
|
@ -135,7 +135,7 @@ models:
|
|||
description: |
|
||||
Count of daily guest journeys with CSAT (customer satisfaction score)
|
||||
in a given date and per specified dimension.
|
||||
tests:
|
||||
data_tests:
|
||||
- kpis_daily_outlier_detector:
|
||||
column_name: total_csat_score_count
|
||||
date_column: date_day
|
||||
|
|
@ -150,7 +150,7 @@ models:
|
|||
description: |
|
||||
Sum of deposit fees paid by guests, without taxes, in GBP
|
||||
in a given date and per specified dimension.
|
||||
tests:
|
||||
data_tests:
|
||||
- kpis_daily_outlier_detector:
|
||||
column_name: deposit_fees_in_gbp
|
||||
date_column: date_day
|
||||
|
|
@ -160,7 +160,7 @@ models:
|
|||
description: |
|
||||
Sum of waiver payments paid by guests, without taxes, in GBP
|
||||
in a given date and per specified dimension.
|
||||
tests:
|
||||
data_tests:
|
||||
- kpis_daily_outlier_detector:
|
||||
column_name: waiver_payments_in_gbp
|
||||
date_column: date_day
|
||||
|
|
@ -170,7 +170,7 @@ models:
|
|||
description: |
|
||||
Sum of checkin cover fees paid by guests, without taxes, in GBP
|
||||
in a given date and per specified dimension.
|
||||
tests:
|
||||
data_tests:
|
||||
- kpis_daily_outlier_detector:
|
||||
column_name: checkin_cover_fees_in_gbp
|
||||
date_column: date_day
|
||||
|
|
@ -180,7 +180,7 @@ models:
|
|||
description: |
|
||||
Sum of total payments paid by guests, without taxes, in GBP
|
||||
in a given date and per specified dimension.
|
||||
tests:
|
||||
data_tests:
|
||||
- kpis_daily_outlier_detector:
|
||||
column_name: total_guest_payments_in_gbp
|
||||
date_column: date_day
|
||||
|
|
@ -263,7 +263,7 @@ models:
|
|||
of time granularity, dimension, dimension value and list of metrics
|
||||
with their value.
|
||||
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- date
|
||||
|
|
@ -277,13 +277,13 @@ models:
|
|||
description: |
|
||||
The end date of the time range specified in the time_granularity
|
||||
for the dimension, dimension_value and metrics in this record.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: time_granularity
|
||||
data_type: string
|
||||
description: The time dimension.
|
||||
tests:
|
||||
data_tests:
|
||||
- accepted_values:
|
||||
values:
|
||||
- Daily
|
||||
|
|
@ -293,7 +293,7 @@ models:
|
|||
- name: dimension
|
||||
data_type: string
|
||||
description: The dimension or granularity of the metrics.
|
||||
tests:
|
||||
data_tests:
|
||||
- accepted_values:
|
||||
values:
|
||||
- "Global"
|
||||
|
|
@ -308,7 +308,7 @@ models:
|
|||
- name: dimension_value
|
||||
data_type: string
|
||||
description: The value or segment available for the selected dimension.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: created_services
|
||||
|
|
@ -368,7 +368,7 @@ models:
|
|||
- name: has_payment
|
||||
data_type: string
|
||||
description: Has there been any guest payments on the guest journey.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
|
|
@ -379,7 +379,7 @@ models:
|
|||
data_type: string
|
||||
description: Does the verification in the guest journey
|
||||
includes Government Id Check for the bookings.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
|
|
@ -390,7 +390,7 @@ models:
|
|||
data_type: string
|
||||
description: |
|
||||
Main billing country of the host aggregated at Deal level.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: timeframe
|
||||
|
|
@ -398,7 +398,7 @@ models:
|
|||
description: |
|
||||
Timeframe considered for the aggregation, it could be Year-to-date,
|
||||
Month-to-date or Week-to-date
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
|
|
|
|||
|
|
@ -10,20 +10,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
|
||||
|
|
@ -34,13 +34,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:
|
||||
|
|
@ -55,7 +55,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
|
||||
|
|
@ -66,7 +66,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
|
||||
|
|
@ -77,7 +77,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
|
||||
|
|
@ -90,7 +90,7 @@ models:
|
|||
- name: verification_status
|
||||
data_type: text
|
||||
description: Outcome of the verification process.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
|
|
@ -113,7 +113,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"
|
||||
|
|
@ -138,13 +138,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
|
||||
|
||||
|
|
@ -207,44 +207,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
|
||||
|
|
|
|||
|
|
@ -795,7 +795,7 @@ models:
|
|||
- name: id_bank_transaction
|
||||
data_type: character varying
|
||||
description: Xero's unique identifier for the transaction.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- unique
|
||||
|
||||
|
|
@ -841,7 +841,7 @@ models:
|
|||
negative, amounts we receive are positive.
|
||||
|
||||
You can read more here: https://developer.xero.com/documentation/api/accounting/types#bank-transactions
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
|
|
@ -861,7 +861,7 @@ models:
|
|||
receiving transactions show as 1. This helps in converting the
|
||||
transaction amounts in the right sign, since Xero brings all amounts
|
||||
as positive by default.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
|
|
@ -876,7 +876,7 @@ models:
|
|||
Can be one of: AUTHORISED, DELETED.
|
||||
|
||||
You can read more here: https://developer.xero.com/documentation/api/accounting/types#bank-transaction-status-codes
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
|
|
@ -900,7 +900,7 @@ models:
|
|||
description: |
|
||||
Total of bank transaction tax inclusive, in the currency the
|
||||
transaction is denominated in.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: total_amount_in_gbp
|
||||
|
|
@ -933,7 +933,7 @@ models:
|
|||
- name: transaction_currency_iso_4217
|
||||
data_type: character varying
|
||||
description: The ISO 4217 code for the currency of the transaction.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- length_between:
|
||||
min_length: 3
|
||||
|
|
@ -956,7 +956,7 @@ models:
|
|||
For example, if the transaction is 135 ZAR, and this rate is 0.0167,
|
||||
the transaction value in GBP is 2.25 (135ZAR * 0.0167GBP/ZAR =
|
||||
2.25GBP).
|
||||
tests:
|
||||
data_tests:
|
||||
- not_negative
|
||||
|
||||
- name: line_amount_tax_inclusiveness
|
||||
|
|
@ -965,7 +965,7 @@ models:
|
|||
Indicates whether the amounts included in line items are tax
|
||||
inclusive (Inclusive), tax exclusive (Exclusive) or simply,
|
||||
there are no taxes on the invoice (NoTax).
|
||||
tests:
|
||||
data_tests:
|
||||
- accepted_values:
|
||||
values:
|
||||
- Inclusive
|
||||
|
|
@ -975,7 +975,7 @@ models:
|
|||
- name: is_reconciled
|
||||
data_type: boolean
|
||||
description: A flag indicating if the transaction has been reconciled.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: has_attachments
|
||||
|
|
@ -1011,13 +1011,13 @@ models:
|
|||
- name: id_bank_transaction
|
||||
data_type: character varying
|
||||
description: Xero's unique identifier for the transaction.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: id_line_item
|
||||
data_type: text
|
||||
description: Xero's unique identifier for the line item.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- unique
|
||||
|
||||
|
|
@ -1121,7 +1121,7 @@ models:
|
|||
- name: id_line_item
|
||||
data_type: text
|
||||
description: Xero's unique identifier for the line item.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- unique
|
||||
|
||||
|
|
@ -1156,7 +1156,7 @@ models:
|
|||
- name: id_line_item
|
||||
data_type: text
|
||||
description: ""
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- unique
|
||||
|
||||
|
|
@ -1168,7 +1168,7 @@ models:
|
|||
data_type: text
|
||||
description: |
|
||||
Indicates whether the record belongs in an invoice or a credit note.
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
|
|
@ -1218,7 +1218,7 @@ models:
|
|||
- name: document_currency_iso_4217
|
||||
data_type: character varying
|
||||
description: ""
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- length_between:
|
||||
min_length: 3
|
||||
|
|
@ -1231,7 +1231,7 @@ models:
|
|||
- name: id_document
|
||||
data_type: character varying
|
||||
description: ""
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: reference
|
||||
|
|
@ -1253,7 +1253,7 @@ models:
|
|||
- name: document_type
|
||||
data_type: character varying
|
||||
description: ""
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
|
|
@ -1269,14 +1269,14 @@ models:
|
|||
- name: exchange_rate_to_gbp
|
||||
data_type: numeric
|
||||
description: ""
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- not_negative
|
||||
|
||||
- name: document_status
|
||||
data_type: character varying
|
||||
description: ""
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
|
|
@ -1290,7 +1290,7 @@ models:
|
|||
- name: line_amount_tax_inclusiveness
|
||||
data_type: character varying
|
||||
description: ""
|
||||
tests:
|
||||
data_tests:
|
||||
- accepted_values:
|
||||
values:
|
||||
- Inclusive
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue