move docs for int_edeposit__guesty_verifications
This commit is contained in:
parent
ba29afa3bd
commit
c81f6c955d
2 changed files with 100 additions and 102 deletions
|
|
@ -1,2 +1,56 @@
|
||||||
#TODO Update to the fact that this only has athena stuff now
|
version: 2
|
||||||
#TODO Update tests to check that there's only athena stuff
|
|
||||||
|
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
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
version: 2
|
version: 2
|
||||||
#TODO Update to the fact that this only has edeposit stuff now
|
|
||||||
#TODO update tests to check that there's only edeposit stuff
|
|
||||||
models:
|
models:
|
||||||
- name: int_edeposit__verifications
|
- name: int_edeposit__verifications
|
||||||
description:
|
description:
|
||||||
|
|
@ -42,7 +41,6 @@ models:
|
||||||
tests:
|
tests:
|
||||||
- accepted_values:
|
- accepted_values:
|
||||||
values:
|
values:
|
||||||
- V1
|
|
||||||
- V2
|
- V2
|
||||||
|
|
||||||
- name: verification_source
|
- name: verification_source
|
||||||
|
|
@ -220,29 +218,29 @@ models:
|
||||||
description: "Unique Superhog generated id for this verification.
|
description: "Unique Superhog generated id for this verification.
|
||||||
Note that there are some users that have a different id in Cosmos.
|
Note that there are some users that have a different id in Cosmos.
|
||||||
For those users we created a mapping to relate this ids."
|
For those users we created a mapping to relate this ids."
|
||||||
# tests:
|
tests:
|
||||||
# - unique
|
- unique
|
||||||
# - not_null
|
- not_null
|
||||||
|
|
||||||
- name: id_booking
|
- name: id_booking
|
||||||
data_type: text
|
data_type: text
|
||||||
description: "unique Superhog generated id for a booking.
|
description: "unique Superhog generated id for a booking.
|
||||||
note that this could be duplicated and both will be charged,
|
note that this could be duplicated and both will be charged,
|
||||||
it's up to the user to no generate duplicate verifications"
|
it's up to the user to no generate duplicate verifications"
|
||||||
# tests:
|
tests:
|
||||||
# - not_null
|
- not_null
|
||||||
|
|
||||||
- name: id_user_partner
|
- name: id_user_partner
|
||||||
data_type: text
|
data_type: text
|
||||||
description: "unique Superhog generated id for partner"
|
description: "unique Superhog generated id for partner"
|
||||||
# tests:
|
tests:
|
||||||
# - not_null
|
- not_null
|
||||||
|
|
||||||
- name: id_accommodation
|
- name: id_accommodation
|
||||||
data_type: text
|
data_type: text
|
||||||
description: "unique Superhog generated id for a listing"
|
description: "unique Superhog generated id for a listing"
|
||||||
# tests:
|
tests:
|
||||||
# - not_null
|
- not_null
|
||||||
|
|
||||||
- name: listing_town
|
- name: listing_town
|
||||||
data_type: text
|
data_type: text
|
||||||
|
|
@ -271,8 +269,8 @@ models:
|
||||||
- name: currency
|
- name: currency
|
||||||
data_type: text
|
data_type: text
|
||||||
description: "currency in which the transaction actually happened"
|
description: "currency in which the transaction actually happened"
|
||||||
# tests:
|
tests:
|
||||||
# - not_null
|
- not_null
|
||||||
|
|
||||||
- name: nightly_fee_local
|
- name: nightly_fee_local
|
||||||
data_type: double precision
|
data_type: double precision
|
||||||
|
|
@ -285,62 +283,62 @@ models:
|
||||||
- name: ok_status_fee_in_txn_currency
|
- name: ok_status_fee_in_txn_currency
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
description: "fee charged in used currency for approved or flagged verifications and not cancelled"
|
description: "fee charged in used currency for approved or flagged verifications and not cancelled"
|
||||||
# tests:
|
tests:
|
||||||
# - not_null
|
- not_null
|
||||||
# - dbt_expectations.expect_column_values_to_be_between:
|
- dbt_expectations.expect_column_values_to_be_between:
|
||||||
# min_value: 0
|
min_value: 0
|
||||||
# strictly: false
|
strictly: false
|
||||||
|
|
||||||
- name: ok_status_fee_in_gbp
|
- name: ok_status_fee_in_gbp
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
description: "fee charged in gbp for approved or flagged verifications and not cancelled"
|
description: "fee charged in gbp for approved or flagged verifications and not cancelled"
|
||||||
# tests:
|
tests:
|
||||||
# - not_null
|
- not_null
|
||||||
# - dbt_expectations.expect_column_values_to_be_between:
|
- dbt_expectations.expect_column_values_to_be_between:
|
||||||
# min_value: 0
|
min_value: 0
|
||||||
# strictly: false
|
strictly: false
|
||||||
|
|
||||||
- name: rejected_fee_in_txn_currency
|
- name: rejected_fee_in_txn_currency
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
description: "fee charged in used currency for rejected verifications"
|
description: "fee charged in used currency for rejected verifications"
|
||||||
# tests:
|
tests:
|
||||||
# - not_null
|
- not_null
|
||||||
# - dbt_expectations.expect_column_values_to_be_between:
|
- dbt_expectations.expect_column_values_to_be_between:
|
||||||
# min_value: 0
|
min_value: 0
|
||||||
# strictly: false
|
strictly: false
|
||||||
|
|
||||||
- name: rejected_fee_in_gbp
|
- name: rejected_fee_in_gbp
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
description: "fee charged in gbp for rejected verifications"
|
description: "fee charged in gbp for rejected verifications"
|
||||||
# tests:
|
tests:
|
||||||
# - not_null
|
- not_null
|
||||||
# - dbt_expectations.expect_column_values_to_be_between:
|
- dbt_expectations.expect_column_values_to_be_between:
|
||||||
# min_value: 0
|
min_value: 0
|
||||||
# strictly: false
|
strictly: false
|
||||||
|
|
||||||
- name: cancelled_fee_in_txn_currency
|
- name: cancelled_fee_in_txn_currency
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
description: "fee charged in used currency for cancelled verifications"
|
description: "fee charged in used currency for cancelled verifications"
|
||||||
# tests:
|
tests:
|
||||||
# - not_null
|
- not_null
|
||||||
# - dbt_expectations.expect_column_values_to_be_between:
|
- dbt_expectations.expect_column_values_to_be_between:
|
||||||
# min_value: 0
|
min_value: 0
|
||||||
# strictly: false
|
strictly: false
|
||||||
|
|
||||||
- name: cancelled_fee_in_gbp
|
- name: cancelled_fee_in_gbp
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
description: "fee charged in gbp for cancelled verifications"
|
description: "fee charged in gbp for cancelled verifications"
|
||||||
# tests:
|
tests:
|
||||||
# - not_null
|
- not_null
|
||||||
# - dbt_expectations.expect_column_values_to_be_between:
|
- dbt_expectations.expect_column_values_to_be_between:
|
||||||
# min_value: 0
|
min_value: 0
|
||||||
# strictly: false
|
strictly: false
|
||||||
|
|
||||||
- name: created_date_utc
|
- name: created_date_utc
|
||||||
data_type: date
|
data_type: date
|
||||||
description: "Date of creation of the verification in the system"
|
description: "Date of creation of the verification in the system"
|
||||||
# tests:
|
tests:
|
||||||
# - not_null
|
- not_null
|
||||||
|
|
||||||
- name: cancelled_date_utc
|
- name: cancelled_date_utc
|
||||||
data_type: date
|
data_type: date
|
||||||
|
|
@ -349,60 +347,6 @@ models:
|
||||||
- name: checkin_date_utc
|
- name: checkin_date_utc
|
||||||
data_type: date
|
data_type: date
|
||||||
description: "Date of checkin for the booking"
|
description: "Date of checkin for the booking"
|
||||||
# tests:
|
|
||||||
# - not_null
|
|
||||||
|
|
||||||
- name: checkout_date_utc
|
|
||||||
data_type: date
|
|
||||||
description: "Date of checkout for the booking"
|
|
||||||
# tests:
|
|
||||||
# - not_null
|
|
||||||
|
|
||||||
- name: int_edeposit__guesty_verifications
|
|
||||||
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:
|
tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue