2024-09-04 09:27:13 +02:00
|
|
|
version: 2
|
|
|
|
|
|
|
|
|
|
models:
|
|
|
|
|
- name: edeposit__verification_fees
|
2024-09-12 15:39:49 +02:00
|
|
|
description:
|
2024-09-04 09:27:13 +02:00
|
|
|
"This table shows all fee charges per verification for E-deposit.
|
|
|
|
|
Cancellation fee is charged when the monthly rate of cancelled bookings over
|
2024-09-04 10:06:37 +02:00
|
|
|
total booking of the partner surpasses the threshold (currently set at 5%).
|
2024-09-04 09:27:13 +02:00
|
|
|
Both cancellation and rejection fees are set to 0.25 though it might change.
|
|
|
|
|
Fees are both in the currency used by the user and in GBP"
|
|
|
|
|
columns:
|
|
|
|
|
- name: id_verification
|
|
|
|
|
data_type: text
|
|
|
|
|
description: "unique Superhog generated id for this verification"
|
2024-09-13 16:31:47 +02:00
|
|
|
# tests:
|
|
|
|
|
# - unique
|
|
|
|
|
# - not_null
|
2024-09-04 09:27:13 +02:00
|
|
|
|
|
|
|
|
- name: id_booking
|
|
|
|
|
data_type: text
|
2024-09-12 15:39:49 +02:00
|
|
|
description: "unique Superhog generated id for a booking.
|
2024-09-13 16:14:03 +02:00
|
|
|
note that there might be duplicate bookings on the original data
|
|
|
|
|
but we remove them keeping only the verification with the most recent update."
|
2024-09-13 16:31:47 +02:00
|
|
|
# tests:
|
|
|
|
|
# - not_null
|
|
|
|
|
# - unique
|
2024-09-04 09:27:13 +02:00
|
|
|
|
2024-10-02 10:57:30 +02:00
|
|
|
- name: id_user_partner
|
|
|
|
|
data_type: text
|
|
|
|
|
description: "unique Superhog generated id for partner"
|
|
|
|
|
# tests:
|
|
|
|
|
# - not_null
|
|
|
|
|
|
|
|
|
|
- name: id_accommodation
|
|
|
|
|
data_type: text
|
|
|
|
|
description: "unique Superhog generated id for a listing"
|
|
|
|
|
# tests:
|
|
|
|
|
# - not_null
|
|
|
|
|
|
|
|
|
|
- name: listing_town
|
|
|
|
|
data_type: text
|
|
|
|
|
description: "town name where the listing is located"
|
|
|
|
|
|
|
|
|
|
- name: listing_country
|
|
|
|
|
data_type: text
|
|
|
|
|
description: "country name where the listing is located"
|
|
|
|
|
|
|
|
|
|
- name: verification_status
|
|
|
|
|
data_type: text
|
|
|
|
|
description: "status of the verification"
|
|
|
|
|
|
|
|
|
|
- name: channel
|
|
|
|
|
data_type: text
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: company_name
|
|
|
|
|
data_type: text
|
|
|
|
|
description: ""
|
|
|
|
|
|
|
|
|
|
- name: is_cancelled
|
|
|
|
|
data_type: boolean
|
|
|
|
|
description: "true if the booking was cancelled"
|
|
|
|
|
|
2024-09-04 09:27:13 +02:00
|
|
|
- name: currency
|
|
|
|
|
data_type: text
|
|
|
|
|
description: "currency in which the transaction actually happened"
|
2024-09-13 16:31:47 +02:00
|
|
|
# tests:
|
|
|
|
|
# - not_null
|
2024-09-04 09:27:13 +02:00
|
|
|
|
2024-10-02 10:57:30 +02:00
|
|
|
- name: nightly_fee_local
|
|
|
|
|
data_type: double precision
|
|
|
|
|
description: "fee charged per night"
|
|
|
|
|
|
|
|
|
|
- name: number_nights
|
|
|
|
|
data_type: integer
|
|
|
|
|
description: "number of nights for the booking"
|
|
|
|
|
|
2024-09-04 09:27:13 +02:00
|
|
|
- name: ok_status_fee_in_txn_currency
|
|
|
|
|
data_type: numeric
|
2024-09-05 12:45:09 +02:00
|
|
|
description: "fee charged in used currency for approved or flagged verifications and not cancelled"
|
2024-09-13 16:31:47 +02:00
|
|
|
# tests:
|
|
|
|
|
# - not_null
|
|
|
|
|
# - dbt_expectations.expect_column_values_to_be_between:
|
|
|
|
|
# min_value: 0
|
|
|
|
|
# strictly: false
|
2024-09-04 09:27:13 +02:00
|
|
|
|
|
|
|
|
- name: ok_status_fee_in_gbp
|
|
|
|
|
data_type: numeric
|
2024-09-05 12:45:09 +02:00
|
|
|
description: "fee charged in gbp for approved or flagged verifications and not cancelled"
|
2024-09-13 16:31:47 +02:00
|
|
|
# tests:
|
|
|
|
|
# - not_null
|
|
|
|
|
# - dbt_expectations.expect_column_values_to_be_between:
|
|
|
|
|
# min_value: 0
|
|
|
|
|
# strictly: false
|
2024-09-04 09:27:13 +02:00
|
|
|
|
|
|
|
|
- name: rejected_fee_in_txn_currency
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: "fee charged in used currency for rejected verifications"
|
2024-09-13 16:31:47 +02:00
|
|
|
# tests:
|
|
|
|
|
# - not_null
|
|
|
|
|
# - dbt_expectations.expect_column_values_to_be_between:
|
|
|
|
|
# min_value: 0
|
|
|
|
|
# strictly: false
|
2024-09-04 09:27:13 +02:00
|
|
|
|
|
|
|
|
- name: rejected_fee_in_gbp
|
|
|
|
|
data_type: numeric
|
|
|
|
|
description: "fee charged in gbp for rejected verifications"
|
2024-09-13 16:31:47 +02:00
|
|
|
# tests:
|
|
|
|
|
# - not_null
|
|
|
|
|
# - dbt_expectations.expect_column_values_to_be_between:
|
|
|
|
|
# min_value: 0
|
|
|
|
|
# strictly: false
|
2024-09-04 09:27:13 +02:00
|
|
|
|
|
|
|
|
- name: cancelled_fee_in_txn_currency
|
|
|
|
|
data_type: numeric
|
2024-09-12 15:39:49 +02:00
|
|
|
description: "fee charged in used currency for cancelled verifications"
|
2024-09-13 16:31:47 +02:00
|
|
|
# tests:
|
|
|
|
|
# - not_null
|
|
|
|
|
# - dbt_expectations.expect_column_values_to_be_between:
|
|
|
|
|
# min_value: 0
|
|
|
|
|
# strictly: false
|
2024-09-04 09:27:13 +02:00
|
|
|
|
|
|
|
|
- name: cancelled_fee_in_gbp
|
|
|
|
|
data_type: numeric
|
2024-09-12 15:39:49 +02:00
|
|
|
description: "fee charged in gbp for cancelled verifications"
|
2024-09-13 16:31:47 +02:00
|
|
|
# tests:
|
|
|
|
|
# - not_null
|
|
|
|
|
# - dbt_expectations.expect_column_values_to_be_between:
|
|
|
|
|
# min_value: 0
|
|
|
|
|
# strictly: false
|
2024-09-04 09:27:13 +02:00
|
|
|
|
2024-10-02 10:57:30 +02:00
|
|
|
- name: created_date_utc
|
2024-09-04 09:27:13 +02:00
|
|
|
data_type: date
|
2024-10-02 10:57:30 +02:00
|
|
|
description: "Date of creation of the verification in the system"
|
2024-09-13 16:31:47 +02:00
|
|
|
# tests:
|
|
|
|
|
# - not_null
|
2024-09-04 09:27:13 +02:00
|
|
|
|
2024-10-02 10:57:30 +02:00
|
|
|
- name: cancelled_date_utc
|
2024-09-04 09:27:13 +02:00
|
|
|
data_type: date
|
2024-10-02 10:57:30 +02:00
|
|
|
description: "Date of cancellation for the booking"
|
|
|
|
|
|
|
|
|
|
- name: checkin_date_utc
|
|
|
|
|
data_type: date
|
|
|
|
|
description: "Date of checkin for the booking"
|
|
|
|
|
# tests:
|
|
|
|
|
# - not_null
|
|
|
|
|
|
|
|
|
|
- name: checkout_date_utc
|
|
|
|
|
data_type: date
|
|
|
|
|
description: "Date of checkout for the booking"
|
2024-09-13 16:31:47 +02:00
|
|
|
# tests:
|
|
|
|
|
# - not_null
|
2024-09-12 15:39:49 +02:00
|
|
|
|
2024-09-05 11:59:57 +02:00
|
|
|
- name: edeposit__guesty_verifications
|
2024-09-12 15:39:49 +02:00
|
|
|
description: "This table shows all verification for Guesty.
|
2024-09-05 13:56:07 +02:00
|
|
|
The charged fee is 2GBP per booked night if booking is approved
|
2024-09-12 15:39:49 +02:00
|
|
|
(considered 1 night when the checkin and checkout are on the same day),
|
2024-09-05 11:59:57 +02:00
|
|
|
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
|
2024-09-12 15:39:49 +02:00
|
|
|
description: "unique Superhog generated id for a booking.
|
|
|
|
|
note that this could be duplicated and both will be charged,
|
2024-09-05 11:59:57 +02:00
|
|
|
it's up to the user to not generate or cancel duplicate verifications"
|
|
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
|
2024-09-05 17:21:48 +02:00
|
|
|
- name: verification_status
|
|
|
|
|
data_type: text
|
|
|
|
|
description: "status of the verification"
|
|
|
|
|
|
2024-09-05 11:59:57 +02:00
|
|
|
- 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
|
2024-09-12 15:39:49 +02:00
|
|
|
description: "total fee charged on checkout, this is only charged for approved verifications"
|
2024-09-05 11:59:57 +02:00
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
- dbt_expectations.expect_column_values_to_be_between:
|
|
|
|
|
min_value: 0
|
|
|
|
|
strictly: true
|
2024-09-05 17:21:48 +02:00
|
|
|
where: is_cancelled = false and verification_status = 'Approved'
|
2024-09-05 11:59:57 +02:00
|
|
|
|
|
|
|
|
- name: created_date_utc
|
|
|
|
|
data_type: date
|
2024-09-12 15:39:49 +02:00
|
|
|
description: "Date of creation of the verification in the system"
|
2024-09-05 11:59:57 +02:00
|
|
|
tests:
|
|
|
|
|
- not_null
|
|
|
|
|
|
|
|
|
|
- name: checkout_date_utc
|
|
|
|
|
data_type: date
|
2024-09-12 15:39:49 +02:00
|
|
|
description: "Date of checkout for the booking"
|
2024-09-04 09:27:13 +02:00
|
|
|
tests:
|
2024-09-12 15:39:49 +02:00
|
|
|
- not_null
|