diff --git a/models/reporting/edeposit/edeposit__guesty_verifications.sql b/models/reporting/edeposit/edeposit__guesty_verifications.sql new file mode 100644 index 0000000..74cec6b --- /dev/null +++ b/models/reporting/edeposit/edeposit__guesty_verifications.sql @@ -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 diff --git a/models/reporting/edeposit/schema.yaml b/models/reporting/edeposit/schema.yaml index e46c312..d78ab26 100644 --- a/models/reporting/edeposit/schema.yaml +++ b/models/reporting/edeposit/schema.yaml @@ -95,5 +95,58 @@ models: - name: created_date_utc data_type: date description: "Date of creation of the verification in the system" + tests: + - 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 \ No newline at end of file