From 366127489d8c55469c89da4d6758e06df8e0831c Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Mon, 13 Jan 2025 15:29:24 +0100 Subject: [PATCH] YOLO 3 --- models/reporting/general/schema.yml | 528 ++++++++++++++-------------- 1 file changed, 264 insertions(+), 264 deletions(-) diff --git a/models/reporting/general/schema.yml b/models/reporting/general/schema.yml index 20d6cf8..3cecbd0 100644 --- a/models/reporting/general/schema.yml +++ b/models/reporting/general/schema.yml @@ -1595,281 +1595,281 @@ models: post waiver payouts and resolution payouts in the time window. It can be null if no revenue was retained post resolution payments. It can be negative, thus indicating that we are losing money. - - name: edeposit_and_athena_verifications + - name: edeposit_and_athena_verifications + description: + "This table holds records on verifications for Guesty and Edeposit bookings. + It contains details on validations checked on the guests, guest information + and some booking details like checkin-checkout date or the status of the verification. + The id values found here are completely unrelated to the ones found in Core DWH. + + Note that id_verifications and booking_id should normally be 1 to 1. + Though there are exception, the API will accept a duplicate booking and the users + will be charged for it. A duplicate would return a unique id_verification." + 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 no generate duplicate verifications" + + - 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" + + - name: version + data_type: text + description: "value to identify if it is Guesty (V1) or E-deposit (V2)" + tests: + - accepted_values: + values: + - V1 + - V2 + + - name: verification_source + data_type: text + description: "source of the verification for the booking" + tests: + - accepted_values: + values: + - Guesty + - Edeposit + + - name: verification_status + data_type: text + description: "status of the verification" + + - name: nightly_fee_local + data_type: double precision + description: "fee in local currency charged per night" + + - name: number_nights + data_type: integer + description: "number of nights for the booking" + + - name: total_fee_local + data_type: double precision + description: "total fee in local currency for the booking" + + - name: email_flag + data_type: text + description: "screening result for email" + + - name: phone_flag + data_type: text + description: "screening result for phone" + + - name: watch_list + data_type: text + description: "screening result of the guest" + + - name: channel + data_type: text + description: "" + + - name: checkin_at_utc + data_type: timestamp without time zone + description: "Timestamp of checkin for the booking" + + - name: checkin_date_utc + data_type: date + description: "Date of checkin for the booking" + + - name: checkout_at_utc + data_type: timestamp without time zone + description: "Timestamp of checkout for the booking" + + - name: checkout_date_utc + data_type: date + description: "Date of checkout for the booking" + + - name: is_cancelled + data_type: boolean + description: "" + + - name: cancelled_at_utc + data_type: timestamp without time zone + description: "Timestamp of cancellation of the booking" + + - name: cancelled_date_utc + data_type: date + description: "Date of cancellation for the booking" + + - name: user_email + data_type: text + description: "" + + - name: guest_email + data_type: text + description: "" + + - name: guest_last_name + data_type: text + description: "" + + - name: guest_first_name + data_type: text + description: "" + + - name: guest_telephone + data_type: text + description: "" + + - name: company_name + data_type: text + description: "" + + - name: property_manager_name + data_type: text + description: "" + + - name: property_manager_email + data_type: text + description: "" + + - name: listing_name + data_type: text + description: "" + + - name: listing_address + data_type: text + description: "" + + - name: listing_town + data_type: text + description: "" + + - name: listing_country + data_type: text + description: "" + + - name: listing_postcode + data_type: text + description: "" + + - name: pets_allowed + data_type: boolean + description: "" + + - name: level_of_protection_amount + data_type: integer + description: "" + + - name: level_of_protection_currency + data_type: text + description: "" + + - name: status_updated_at_utc + data_type: timestamp without time zone + description: "Timestamp when status was last updated" + + - name: status_updated_date_utc + data_type: date + description: "Date of last status update of the verification" + + - name: updated_at_utc + data_type: timestamp without time zone + description: "Timestamp of last updated of the verification" + + - name: updated_date_utc + data_type: date + description: "Date of last update of the verification" + + - name: athena_creation_at_utc + data_type: timestamp without time zone description: - "This table holds records on verifications for Guesty and Edeposit bookings. - It contains details on validations checked on the guests, guest information - and some booking details like checkin-checkout date or the status of the verification. - The id values found here are completely unrelated to the ones found in Core DWH. + "Athena timestamp referring to when the booking was created. + It's provided by Guesty, but is not mandatory. + In case of doubt use created_at_utc or created_date_utc fields" - Note that id_verifications and booking_id should normally be 1 to 1. - Though there are exception, the API will accept a duplicate booking and the users - will be charged for it. A duplicate would return a unique id_verification." - columns: - - name: id_verification - data_type: text - description: "unique Superhog generated id for this verification" - tests: - - unique - - not_null + - name: athena_creation_date_utc + data_type: date + description: "Athena date referring to when the booking was created. + It's provided by Guesty, but is not mandatory. + In case of doubt use created_at_utc or created_date_utc fields" - - 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 no generate duplicate verifications" + - name: created_at_utc + data_type: timestamp without time zone + description: "Timestamp of creation of the verification in the system" - - name: id_user_partner - data_type: text - description: "unique Superhog generated id for partner" - tests: - - not_null + - name: created_date_utc + data_type: date + description: "Date of creation of the verification in the system" - - name: id_accommodation - data_type: text - description: "unique Superhog generated id for a listing" + - name: deals_consolidation + description: | + "This table contains all deal ids from different sources used in Superhog. + It contains the source (Hubspot, Xero or Core), the id_deal and the name" + columns: + - name: id_deal + data_type: character varying + description: "Unique ID for this deal." + tests: + - unique + - not_null - - name: version - data_type: text - description: "value to identify if it is Guesty (V1) or E-deposit (V2)" - tests: - - accepted_values: - values: - - V1 - - V2 + - name: core_company_name + data_type: character varying + description: "Company name of the deal as shown in Core." - - name: verification_source - data_type: text - description: "source of the verification for the booking" - tests: - - accepted_values: - values: - - Guesty - - Edeposit + - name: core_company_name_count + data_type: integer + description: "Count of distinct names the deal has in Core. + It might be the case that a deal has ony NULL value for a name, + so the count will be 0" + tests: + - dbt_expectations.expect_column_values_to_be_between: + min_value: 0 + strictly: false - - name: verification_status - data_type: text - description: "status of the verification" + - name: hubspot_deal_name + data_type: character varying + description: "Name of the deal as shown in Hubspot." - - name: nightly_fee_local - data_type: double precision - description: "fee in local currency charged per night" + - name: hubspot_deal_name_count + data_type: integer + description: "Count of distinct names the deal has in Hubspot. + It might be the case that a deal has ony NULL value for a name, + so the count will be 0" + tests: + - dbt_expectations.expect_column_values_to_be_between: + min_value: 0 + strictly: false - - name: number_nights - data_type: integer - description: "number of nights for the booking" + - name: xero_contact_name + data_type: character varying + description: "Contact name of the deal as shown in Xero." - - name: total_fee_local - data_type: double precision - description: "total fee in local currency for the booking" + - name: xero_contact_name_count + data_type: integer + description: "Count of distinct names the deal has in Xero. + It might be the case that a deal has ony NULL value for a name, + so the count will be 0" + tests: + - dbt_expectations.expect_column_values_to_be_between: + min_value: 0 + strictly: false - - name: email_flag - data_type: text - description: "screening result for email" + - name: is_deal_in_core + data_type: boolean + description: "Flag to indicate if the deal is in Core." - - name: phone_flag - data_type: text - description: "screening result for phone" + - name: is_deal_in_hubspot + data_type: boolean + description: "Flag to indicate if the deal is in Hubspot." - - name: watch_list - data_type: text - description: "screening result of the guest" - - - name: channel - data_type: text - description: "" - - - name: checkin_at_utc - data_type: timestamp without time zone - description: "Timestamp of checkin for the booking" - - - name: checkin_date_utc - data_type: date - description: "Date of checkin for the booking" - - - name: checkout_at_utc - data_type: timestamp without time zone - description: "Timestamp of checkout for the booking" - - - name: checkout_date_utc - data_type: date - description: "Date of checkout for the booking" - - - name: is_cancelled - data_type: boolean - description: "" - - - name: cancelled_at_utc - data_type: timestamp without time zone - description: "Timestamp of cancellation of the booking" - - - name: cancelled_date_utc - data_type: date - description: "Date of cancellation for the booking" - - - name: user_email - data_type: text - description: "" - - - name: guest_email - data_type: text - description: "" - - - name: guest_last_name - data_type: text - description: "" - - - name: guest_first_name - data_type: text - description: "" - - - name: guest_telephone - data_type: text - description: "" - - - name: company_name - data_type: text - description: "" - - - name: property_manager_name - data_type: text - description: "" - - - name: property_manager_email - data_type: text - description: "" - - - name: listing_name - data_type: text - description: "" - - - name: listing_address - data_type: text - description: "" - - - name: listing_town - data_type: text - description: "" - - - name: listing_country - data_type: text - description: "" - - - name: listing_postcode - data_type: text - description: "" - - - name: pets_allowed - data_type: boolean - description: "" - - - name: level_of_protection_amount - data_type: integer - description: "" - - - name: level_of_protection_currency - data_type: text - description: "" - - - name: status_updated_at_utc - data_type: timestamp without time zone - description: "Timestamp when status was last updated" - - - name: status_updated_date_utc - data_type: date - description: "Date of last status update of the verification" - - - name: updated_at_utc - data_type: timestamp without time zone - description: "Timestamp of last updated of the verification" - - - name: updated_date_utc - data_type: date - description: "Date of last update of the verification" - - - name: athena_creation_at_utc - data_type: timestamp without time zone - description: - "Athena timestamp referring to when the booking was created. - It's provided by Guesty, but is not mandatory. - In case of doubt use created_at_utc or created_date_utc fields" - - - name: athena_creation_date_utc - data_type: date - description: "Athena date referring to when the booking was created. - It's provided by Guesty, but is not mandatory. - In case of doubt use created_at_utc or created_date_utc fields" - - - name: created_at_utc - data_type: timestamp without time zone - description: "Timestamp of creation of the verification in the system" - - - name: created_date_utc - data_type: date - description: "Date of creation of the verification in the system" - - - name: deals_consolidation - description: | - "This table contains all deal ids from different sources used in Superhog. - It contains the source (Hubspot, Xero or Core), the id_deal and the name" - columns: - - name: id_deal - data_type: character varying - description: "Unique ID for this deal." - tests: - - unique - - not_null - - - name: core_company_name - data_type: character varying - description: "Company name of the deal as shown in Core." - - - name: core_company_name_count - data_type: integer - description: "Count of distinct names the deal has in Core. - It might be the case that a deal has ony NULL value for a name, - so the count will be 0" - tests: - - dbt_expectations.expect_column_values_to_be_between: - min_value: 0 - strictly: false - - - name: hubspot_deal_name - data_type: character varying - description: "Name of the deal as shown in Hubspot." - - - name: hubspot_deal_name_count - data_type: integer - description: "Count of distinct names the deal has in Hubspot. - It might be the case that a deal has ony NULL value for a name, - so the count will be 0" - tests: - - dbt_expectations.expect_column_values_to_be_between: - min_value: 0 - strictly: false - - - name: xero_contact_name - data_type: character varying - description: "Contact name of the deal as shown in Xero." - - - name: xero_contact_name_count - data_type: integer - description: "Count of distinct names the deal has in Xero. - It might be the case that a deal has ony NULL value for a name, - so the count will be 0" - tests: - - dbt_expectations.expect_column_values_to_be_between: - min_value: 0 - strictly: false - - - name: is_deal_in_core - data_type: boolean - description: "Flag to indicate if the deal is in Core." - - - name: is_deal_in_hubspot - data_type: boolean - description: "Flag to indicate if the deal is in Hubspot." - - - name: is_deal_in_xero - data_type: boolean - description: "Flag to indicate if the deal is in Xero." + - name: is_deal_in_xero + data_type: boolean + description: "Flag to indicate if the deal is in Xero."