Merged PR 2748: guesty_verifications to reporting
# Description guesty_verifications to reporting # Checklist - [x] The edited models and dependants run properly with production data. - [x] The edited models are sufficiently documented. - [x] The edited models contain PK tests, and I've ran and passed them. - [x] I have checked for DRY opportunities with other models and docs. - [x] I've picked the right materialization for the affected models. # Other - [ ] Check if a full-refresh is required after this PR is merged. Related work items: #20125
This commit is contained in:
commit
81f57e0b5a
2 changed files with 66 additions and 0 deletions
13
models/reporting/edeposit/edeposit__guesty_verifications.sql
Normal file
13
models/reporting/edeposit/edeposit__guesty_verifications.sql
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
with
|
||||||
|
int_edeposit__guesty_verifications as (
|
||||||
|
select * from {{ ref("int_edeposit__guesty_verifications") }}
|
||||||
|
)
|
||||||
|
|
||||||
|
select
|
||||||
|
gv.id_verification as id_verification,
|
||||||
|
gv.id_booking as id_booking,
|
||||||
|
gv.is_cancelled as is_cancelled,
|
||||||
|
gv.ok_status_fee_in_gbp as ok_status_fee_in_gbp,
|
||||||
|
gv.created_date_utc as created_date_utc,
|
||||||
|
gv.checkout_date_utc as checkout_date_utc
|
||||||
|
from int_edeposit__guesty_verifications gv
|
||||||
|
|
@ -97,3 +97,56 @@ models:
|
||||||
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: edeposit__guesty_verifications
|
||||||
|
description:
|
||||||
|
"This table shows all verification for Guesty.
|
||||||
|
The charged fee is 2GBP per booked night if booking is approved,
|
||||||
|
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 this could be duplicated and both will be charged,
|
||||||
|
it's up to the user to not generate or cancel duplicate verifications"
|
||||||
|
tests:
|
||||||
|
- not_null
|
||||||
|
|
||||||
|
- 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
|
||||||
|
|
||||||
|
- 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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue