2024-10-08 14:45:50 +02:00
|
|
|
version: 2
|
|
|
|
|
|
|
|
|
|
models:
|
|
|
|
|
- name: int_athena__verifications_with_fees
|
|
|
|
|
description: "This table shows all verification for Guesty.
|
|
|
|
|
The charged fee is 2GBP per booked night if booking is approved
|
|
|
|
|
(considered 1 night when the checkin and checkout are on the same day),
|
|
|
|
|
to be charged on checkout."
|
|
|
|
|
columns:
|
|
|
|
|
- name: id_verification
|
|
|
|
|
data_type: text
|
|
|
|
|
description: "unique Superhog generated id for this verification"
|
|
|
|
|
tests:
|
|
|
|
|
- unique
|
|
|
|
|
- not_null
|
|
|
|
|
|
|
|
|
|
- name: id_booking
|
|
|
|
|
data_type: text
|
|
|
|
|
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:
|
|
|
|
|
- not_null
|
|
|
|
|
- unique
|
|
|
|
|
|
|
|
|
|
- name: verification_status
|
|
|
|
|
data_type: text
|
|
|
|
|
description: "status of the verification"
|
|
|
|
|
|
|
|
|
|
- name: is_cancelled
|
|
|
|
|
data_type: boolean
|
|
|
|
|
description: "indicates if the booking has been cancelled or not."
|
|
|
|
|
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:
|
|
|
|
|
- not_null
|
|
|
|
|
- dbt_expectations.expect_column_values_to_be_between:
|
|
|
|
|
min_value: 0
|
|
|
|
|
strictly: true
|
|
|
|
|
where: is_cancelled = false and verification_status = 'Approved'
|
|
|
|
|
|
|
|
|
|
- name: created_date_utc
|
|
|
|
|
data_type: date
|
|
|
|
|
description: "Date of creation of the verification in the system"
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
|
|
|
|
|
- name: checkout_date_utc
|
|
|
|
|
data_type: date
|
|
|
|
|
description: "Date of checkout for the booking"
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|