# Description Removes 2 fields that no longer exist in the backend. Needed to do since I need to bring another table to sync_core. No PBI dependencies found. Fields are: * flag_as_problem in SH User * autonavigate in VerificationSet # Checklist - [X] The edited models and dependants run properly with production data. - [ ] The edited models are sufficiently documented. - [X] The edited models contain PK tests, and I've ran and passed them. - [ ] I have checked for DRY opportunities with other models and docs. - [ ] I've picked the right materialization for the affected models. # Other - [X] Check if a full-refresh is required after this PR is merged. Related work items: #30229
2336 lines
76 KiB
YAML
2336 lines
76 KiB
YAML
version: 2
|
|
|
|
models:
|
|
- name: core__bookings
|
|
description: |
|
|
|
|
Bookings that have been processed by the Superhog backend.
|
|
|
|
Each record matches one booking.
|
|
|
|
All data is coming from the Superhog backend. Some dimensions have been denormalized.
|
|
Some pre-aggregations to the booking level have also been performed and added here.
|
|
|
|
columns:
|
|
- name: id_booking
|
|
data_type: bigint
|
|
description: The unique, Superhog generated id for this booking.
|
|
data_tests:
|
|
- unique
|
|
- not_null
|
|
|
|
- name: id_user_guest
|
|
data_type: character varying
|
|
description: The UUID of the Superhog user playing the guest role in the booking.
|
|
|
|
- name: id_user_host
|
|
data_type: character varying
|
|
description: The UUID of the Superhog user playing the host role in the booking.
|
|
|
|
- name: id_accommodation
|
|
data_type: bigint
|
|
description: The ID of the booked listing.
|
|
|
|
- name: is_duplicate_booking
|
|
data_type: boolean
|
|
description: |
|
|
A flag that identifies whether the booking is a duplicate.
|
|
|
|
A booking is considered a duplicate if there's an older booking with the same user,
|
|
accomodation and check-in date. If there are two or more bookings with the same user,
|
|
accomodation and check-in date, the oldest one will have False as a value in this field,
|
|
and the other ones will have True as a value in this Failed."
|
|
|
|
Put simply, if you don't want to receive duplicates, filter this field to True.
|
|
|
|
- name: booking_fee_local
|
|
data_type: numeric
|
|
description: |
|
|
The fee that Superhog should charge the host for this booking, measured in local
|
|
currency.
|
|
|
|
This fee is calculated by finding what was the active price plan for the host user
|
|
when the booking fee had to be charged.
|
|
|
|
- name: booking_fee_charge_at_utc
|
|
data_type: timestamp without time zone
|
|
description: |
|
|
The point in time in which the booking should be invoiced.
|
|
|
|
This could be the check-in date of the booking or the date in which the guest verification
|
|
started, depending on the billing settings of the host.
|
|
|
|
- name: booking_fee_charge_date_utc
|
|
data_type: date
|
|
description: |
|
|
The date in which the booking should be invoiced.
|
|
|
|
This could be the check-in date of the booking or the date in which the guest verification
|
|
started, depending on the billing settings of the host.
|
|
|
|
- name: core__vr_check_in_cover
|
|
description: |
|
|
This is a check-in cover specific fact table designed to support basic
|
|
reporting on the Check-In Hero product.
|
|
|
|
Granularity is roughly on the Guest Journey (Verification Request) level.
|
|
It contains data from many entities, including Verification Request,
|
|
booking, payments, etc.
|
|
|
|
columns:
|
|
- name: id_verification_request
|
|
data_type: bigint
|
|
description: |
|
|
Unique, incremental, internal ID for the related verification
|
|
request.
|
|
data_tests:
|
|
- not_null
|
|
- unique
|
|
|
|
- name: uuid_verification_request
|
|
data_type: text
|
|
description: uuid for the related verification request.
|
|
|
|
- name: id_user_guest
|
|
data_type: character varying
|
|
description: Unique, incremental, internal ID for the guest user.
|
|
|
|
- name: id_user_host
|
|
data_type: character varying
|
|
description: Unique, incremental, internal ID for the host user.
|
|
|
|
- name: id_booking
|
|
data_type: bigint
|
|
description: Unique, incremental, internal ID for the related booking.
|
|
|
|
- name: id_accommodation
|
|
data_type: bigint
|
|
description: Unique, incremental, internal ID for the related listing.
|
|
|
|
- name: is_verification_request_complete
|
|
data_type: boolean
|
|
description: |
|
|
True if the verification request is considered is considered
|
|
complete, AKA the guest has finished the full guest journey.
|
|
|
|
- name: is_past_check_in
|
|
data_type: boolean
|
|
description: |
|
|
True if the check-in date is in the past, false otherwise. This value
|
|
only gets informed for users who have bought check-in cover.
|
|
|
|
- name: is_awaiting_check_in
|
|
data_type: boolean
|
|
description: |
|
|
True if the check-in date is in the future, false otherwise. This
|
|
value only gets informed for users who have bought check-in cover.
|
|
|
|
- name: cover_was_purchased
|
|
data_type: boolean
|
|
description: |
|
|
True if the guest purchased the check-in cover.
|
|
|
|
This is identified by the fact that there is a payment of type
|
|
check-in cover associated with this guest journey.
|
|
|
|
- name: cover_was_rejected
|
|
data_type: boolean
|
|
description: |
|
|
True if the guest didn't choose to purchase the check-in cover.
|
|
|
|
This is identified by the facts:
|
|
- There is no payment of type check-in cover associated with this
|
|
guest journey.
|
|
- The guest journey is completed, meaning the guest can't make the
|
|
choice of purchasing the check-in cover anymore.
|
|
|
|
- name: guest_email
|
|
data_type: character varying
|
|
description: The email of the guest.
|
|
|
|
- name: last_name
|
|
data_type: character varying
|
|
description: The last name of the guest.
|
|
|
|
- name: first_name
|
|
data_type: character varying
|
|
description: The first name of the guest.
|
|
|
|
- name: guest_phone_number
|
|
data_type: character varying
|
|
description: The phone number of the guest.
|
|
|
|
- name: telephone_code
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: guest_phone_number_2
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: check_in_at_utc
|
|
data_type: timestamp without time zone
|
|
description: The date time when the guest will check-in, in UTC.
|
|
|
|
- name: check_in_date_utc
|
|
data_type: date
|
|
description: The date when the guest will check-in, in UTC.
|
|
|
|
- name: check_out_at_utc
|
|
data_type: timestamp without time zone
|
|
description: The date time when the guest will check-out, in UTC.
|
|
|
|
- name: check_out_date_utc
|
|
data_type: date
|
|
description: The date time when the guest will check-out, in UTC.
|
|
|
|
- name: verification_start_at_utc
|
|
data_type: timestamp without time zone
|
|
description: |
|
|
The date and time at which the guest started the guest journey.
|
|
|
|
- name: verification_start_date_utc
|
|
data_type: date
|
|
description: The date on which the guest started the guest journey.
|
|
|
|
- name: verification_end_at_utc
|
|
data_type: timestamp without time zone
|
|
description: |
|
|
The date and time at which the guest finished the guest journey.
|
|
|
|
- name: verification_end_date_utc
|
|
data_type: date
|
|
description: |
|
|
The date at which the guest finished the guest journey.
|
|
|
|
- name: total_amount_in_txn_currency
|
|
data_type: numeric
|
|
description: |
|
|
The amount paid by the guest for the check-in cover, in the currency
|
|
in which the payment actually took place. Tax inclusive.
|
|
|
|
- name: amount_without_taxes_in_txn_currency
|
|
data_type: numeric
|
|
description: |
|
|
The equivalent amount paid by the guest for the check-in cover, in the currency
|
|
in which the payment actually took place, without taxes.
|
|
|
|
- name: currency
|
|
data_type: character varying
|
|
description: The currency used by the guest for the payment.
|
|
|
|
- name: total_amount_in_gbp
|
|
data_type: numeric
|
|
description: The amount paid by the guest, converted into GBP. Tax inclusive.
|
|
|
|
- name: amount_without_taxes_in_gbp
|
|
data_type: numeric
|
|
description: The equivalent amount paid by the guest, converted into GBP and without taxes.
|
|
|
|
- name: payment_status
|
|
data_type: character varying
|
|
description: The status of the payment.
|
|
|
|
- name: payment_paid_date_utc
|
|
data_type: date
|
|
description: The date in which the guest made the payment.
|
|
|
|
- name: checkin_cover_cover_amount_local_curr
|
|
data_type: numeric
|
|
description: |
|
|
The total amount for which the guest check-in is covered, according
|
|
to the Superhog backend, in the same currency as the guest payment.
|
|
|
|
Bear in mind that the implementation of Check-In Hero pricing in the
|
|
backend holds some tremendous technical debt, which pretty much
|
|
prevents changes in the pricing and has no concept of historical
|
|
pricing.
|
|
|
|
The current implementation of this model is very naive and assumes
|
|
that prices have not changed. If prices have been changed somehow in
|
|
the backend, but someone hasn't taken care of performing the right
|
|
updates in upstream dependencies of this model, then it's most
|
|
probably broken and unreliable.
|
|
|
|
For more details, contact pablo.martin or Lawrence.
|
|
|
|
- name: checkin_cover_cover_amount_in_gbp
|
|
data_type: numeric
|
|
description: |
|
|
The total amount for which the guest check-in is covered, according
|
|
to the Superhog backend, converted to GBP.
|
|
|
|
Bear in mind that the implementation of Check-In Hero pricing in the
|
|
backend holds some tremendous technical debt, which pretty much
|
|
prevents changes in the pricing and has no concept of historical
|
|
pricing.
|
|
|
|
The current implementation of this model is very naive and assumes
|
|
that prices have not changed. If prices have been changed somehow in
|
|
the backend, but someone hasn't taken care of performing the right
|
|
updates in upstream dependencies of this model, then it's most
|
|
probably broken and unreliable.
|
|
|
|
For more details, contact pablo.martin or Lawrence.
|
|
|
|
- name: core__verification_requests
|
|
description:
|
|
This is a table that shows all guest journey from our guests users with
|
|
each record matching each guest journey.
|
|
|
|
It holds information about the guests like name, email, phone, etc.., as
|
|
well as dates regarding the process of the guest journey like when it
|
|
was started or finished.
|
|
columns:
|
|
- name: id_verification_request
|
|
data_type: bigint
|
|
description:
|
|
Unique, incremental, internal ID for the related verification
|
|
request.
|
|
|
|
- name: uuid_verification_request
|
|
data_type: text
|
|
description: uuid for the related verification request.
|
|
|
|
- name: id_verification_set
|
|
data_type: bigint
|
|
description: ""
|
|
|
|
- name: id_superhog_verified_set
|
|
data_type: bigint
|
|
description: ""
|
|
|
|
- name: id_payment_validation_set
|
|
data_type: bigint
|
|
description: ""
|
|
|
|
- name: id_user_guest
|
|
data_type: character varying
|
|
description: Unique, incremental, internal ID for the guest user.
|
|
|
|
- name: id_user_host
|
|
data_type: character varying
|
|
description: Unique, incremental, internal ID for the host user.
|
|
|
|
- name: is_verification_request_complete
|
|
data_type: boolean
|
|
description: True if the verification request is considered
|
|
complete, AKA the guest has finished the full guest journey.
|
|
|
|
- name: verification_url
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: callback_url
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: redirect_url
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: logo
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: guest_email
|
|
data_type: character varying
|
|
description: The email of the guest.
|
|
|
|
- name: last_name
|
|
data_type: character varying
|
|
description: The last name of the guest.
|
|
|
|
- name: first_name
|
|
data_type: character varying
|
|
description: The first name of the guest.
|
|
|
|
- name: guest_phone_number
|
|
data_type: character varying
|
|
description: The phone number of the guest.
|
|
|
|
- name: telephone_code
|
|
data_type: character varying
|
|
description: The telephone code of the guest.
|
|
|
|
- name: guest_phone_number_2
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: verification_start_at_utc
|
|
data_type: timestamp without time zone
|
|
description: The date and time at which the guest started the guest journey.
|
|
|
|
- name: verification_start_date_utc
|
|
data_type: date
|
|
description: The date on which the guest started the guest journey.
|
|
|
|
- name: verification_end_at_utc
|
|
data_type: timestamp without time zone
|
|
description: The date and time at which the guest finished the guest journey.
|
|
|
|
- name: verification_end_date_utc
|
|
data_type: date
|
|
description: The date on which the guest finished the guest journey.
|
|
|
|
- name: link_used_at_utc
|
|
data_type: timestamp without time zone
|
|
description: The date and time at which the guest used the link for the verification.
|
|
|
|
- name: link_used_date_utc
|
|
data_type: date
|
|
description: The date on which the guest used the link for the verification.
|
|
|
|
- name: expire_at_utc
|
|
data_type: timestamp without time zone
|
|
description: The date and time at which the link for the verification expires.
|
|
|
|
- name: expire_date_utc
|
|
data_type: date
|
|
description: The date on which the link for the verification expires.
|
|
|
|
- name: is_deleted
|
|
data_type: boolean
|
|
description: |
|
|
True if the link for verification expired before finishing the
|
|
verification.
|
|
|
|
- name: redirect_name
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: id_one_step_link
|
|
data_type: bigint
|
|
description: ""
|
|
|
|
- name: success_message
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: summary
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: rejection_reason
|
|
data_type: character varying
|
|
description: Reason as to why the guest was rejected.
|
|
|
|
- name: has_switched_to_mobile
|
|
data_type: boolean
|
|
description: |
|
|
True if the guest changed has switched to mobile
|
|
during the verification process.
|
|
|
|
- name: is_verifier_rejected
|
|
data_type: boolean
|
|
description: ""
|
|
|
|
- name: config
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: metadata
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: created_at_utc
|
|
data_type: timestamp without time zone
|
|
description: The date and time at which the verification process was created.
|
|
|
|
- name: created_date_utc
|
|
data_type: date
|
|
description: The date on which the verification process was created.
|
|
|
|
- name: updated_at_utc
|
|
data_type: timestamp without time zone
|
|
description: The date and time at which the last update on the entry happened.
|
|
|
|
- name: updated_date_utc
|
|
data_type: date
|
|
description: The date on which the last update on the entry happened.
|
|
|
|
- name: dwh_extracted_at_utc
|
|
data_type: timestamp with time zone
|
|
description: ""
|
|
|
|
- name: core__unified_user
|
|
description:
|
|
This is a table to join data from all users of Superhog (hosts, PMs, guests, etc).
|
|
|
|
It contains details of every user like name, last name, email address, etc.
|
|
columns:
|
|
- name: id_user
|
|
data_type: character varying
|
|
description: Unique, incremental, internal ID for the user.
|
|
data_tests:
|
|
- unique
|
|
- not_null
|
|
|
|
- name: id_account_type
|
|
data_type: bigint
|
|
description: Internal ID for type of user.
|
|
|
|
- name: id_billing_country
|
|
data_type: bigint
|
|
description: ""
|
|
|
|
- name: account_currency_iso4217
|
|
data_type: character varying
|
|
description: Currency used by host/pm/platform users.
|
|
|
|
- name: user_code
|
|
data_type: bigint
|
|
description: ""
|
|
|
|
- name: first_name
|
|
data_type: character varying
|
|
description: First name of user.
|
|
|
|
- name: last_name
|
|
data_type: character varying
|
|
description: Last name of user.
|
|
|
|
- name: email
|
|
data_type: character varying
|
|
description: The email of the user.
|
|
|
|
- name: title
|
|
data_type: character varying
|
|
description: Title of the user (Mr, Ms, etc).
|
|
|
|
- name: id_deal
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: is_deleted
|
|
data_type: boolean
|
|
description: ¦ True if the user has been deleted.
|
|
|
|
- name: joined_at_utc
|
|
data_type: timestamp without time zone
|
|
description: The date time when the user created it's account in Superhog.
|
|
|
|
- name: joined_date_utc
|
|
data_type: date
|
|
description: The date when the user created it's account in Superhog.
|
|
|
|
- name: user_name
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: code_prefix
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: billing_town
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: company_name
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: is_email_confirmed
|
|
data_type: boolean
|
|
description: ¦ True if the email has been confirmed.
|
|
|
|
- name: is_lockout_enabled
|
|
data_type: boolean
|
|
description: ""
|
|
|
|
- name: billing_postcode
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: is_twofactor_enabled
|
|
data_type: boolean
|
|
description: ""
|
|
|
|
- name: access_failed_count
|
|
data_type: bigint
|
|
description: ""
|
|
|
|
- name: lockout_end_date_utc
|
|
data_type: timestamp without time zone
|
|
description: ""
|
|
|
|
- name: avatar
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: id_airbnb
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: airbnb_url
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: created_at_utc
|
|
data_type: timestamp
|
|
description: The timestamp when the user was created.
|
|
|
|
- name: created_date_utc
|
|
data_type: date
|
|
description: The date when the user was created.
|
|
|
|
- name: updated_at_utc
|
|
data_type: timestamp
|
|
description: The timestamp when the user was updated.
|
|
|
|
- name: updated_date_utc
|
|
data_type: date
|
|
description: The date when the user was updated.
|
|
|
|
- name: verified_at_utc
|
|
data_type: timestamp without time zone
|
|
description: ""
|
|
|
|
- name: verified_date_utc
|
|
data_type: date
|
|
description: ""
|
|
|
|
- name: number_of_properties
|
|
data_type: bigint
|
|
description: ""
|
|
|
|
- name: id_superhog_verified_set
|
|
data_type: bigint
|
|
description: ""
|
|
|
|
- name: platform_comms_recipient
|
|
data_type: bigint
|
|
description: ""
|
|
|
|
- name: other_sharing_platform_url
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: id_user_verification_status
|
|
data_type: bigint
|
|
description: ""
|
|
|
|
- name: core__check_in_cover_users
|
|
description:
|
|
This model contains information about hosts that offer check in cover.
|
|
It has basic information on the users like name, phone, email or joined date.
|
|
|
|
This model is restricted to active user so it doesn't include historical data
|
|
like users that had check-in cover but are currently inactive.
|
|
columns:
|
|
- name: id_user_host
|
|
data_type: character varying
|
|
description: Unique id value for the user
|
|
data_tests:
|
|
- not_null
|
|
- unique
|
|
|
|
- name: id_deal
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: last_name
|
|
data_type: character varying
|
|
description: Last name of the user
|
|
|
|
- name: user_name
|
|
data_type: character varying
|
|
description: User name of the user
|
|
|
|
- name: first_name
|
|
data_type: character varying
|
|
description: First name of the user
|
|
|
|
- name: host_email
|
|
data_type: character varying
|
|
description: Email of the user
|
|
|
|
- name: phone_number
|
|
data_type: character varying
|
|
description: Phone number of the user
|
|
|
|
- name: joined_at_utc
|
|
data_type: timestamp without time zone
|
|
description: Date and time the user joined
|
|
|
|
- name: joined_date_utc
|
|
data_type: date
|
|
description: Date the user joined
|
|
|
|
- name: check_in_cover_added_date_utc
|
|
data_type: date
|
|
description: Date the user first included check-in cover
|
|
|
|
- name: billing_town
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: company_name
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: core__guest_satisfaction_responses
|
|
description:
|
|
This model contains information on guests satisfaction survey responses,
|
|
it contains some basic information on the guests, a rating of their experience
|
|
and some comments on it.
|
|
It also includes information on the services provided by Superhog that they payed for.
|
|
columns:
|
|
- name: id_verification_request
|
|
data_type: bigint
|
|
description: Unique id value for the verification request
|
|
data_tests:
|
|
- not_null
|
|
- unique
|
|
|
|
- name: id_user_guest
|
|
data_type: character varying
|
|
description: Unique id value for the guest
|
|
|
|
- name: guest_email
|
|
data_type: character varying
|
|
description: Guest email
|
|
|
|
- name: verification_request_booking_source
|
|
data_type: text
|
|
description: Source type of host of the booking, this could be either;
|
|
- PMS
|
|
- OSL
|
|
- API/MANUAL
|
|
data_tests:
|
|
- accepted_values:
|
|
values:
|
|
- "PMS"
|
|
- "OSL"
|
|
- "API/MANUAL"
|
|
|
|
- name: experience_rating
|
|
data_type: bigint
|
|
description: Guest rating of their experience with Superhog from 1 to 5
|
|
|
|
- name: guest_comments
|
|
data_type: character varying
|
|
description: Guest comments on their experience with Superhog
|
|
|
|
- name: is_contactable
|
|
data_type: boolean
|
|
description: |
|
|
True if the guest allows to be contacted for more feedback
|
|
|
|
- name: created_at_utc
|
|
data_type: timestamp without time zone
|
|
description: Date and time of response creation
|
|
|
|
- name: updated_at_utc
|
|
data_type: timestamp without time zone
|
|
description: Date and time of last update of response
|
|
|
|
- name: selected_payment_option
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: date_of_birth
|
|
data_type: numeric
|
|
description: ""
|
|
|
|
- name: age_of_guest
|
|
data_type: numeric
|
|
description: ""
|
|
|
|
- name: has_check_in_cover_payment
|
|
data_type: boolean
|
|
description: |
|
|
True if guest payed for check-in cover
|
|
|
|
- name: has_waiver_payment
|
|
data_type: boolean
|
|
description: |
|
|
True if guest payed the waiver
|
|
|
|
- name: has_deposit_payment
|
|
data_type: boolean
|
|
description: |
|
|
True if guest payed the deposit
|
|
|
|
- name: has_fee_payment
|
|
data_type: boolean
|
|
description: |
|
|
True if guest payed the fee
|
|
|
|
- name: core__check_in_cover_listings
|
|
description: This model contains information about hosts and their listings
|
|
that offer check in cover.
|
|
It has basic information on the users and listings like country,
|
|
town, address and if they are active or not.
|
|
|
|
This model is restricted to active user so it doesn't include historical
|
|
data like users that had check-in cover but are currently inactive.
|
|
columns:
|
|
- name: id_user_host
|
|
data_type: character varying
|
|
description: Unique id value for the user
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: id_deal
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: last_name
|
|
data_type: character varying
|
|
description: Last name of the user
|
|
|
|
- name: user_name
|
|
data_type: character varying
|
|
description: User name of the user
|
|
|
|
- name: first_name
|
|
data_type: character varying
|
|
description: First name of the user
|
|
|
|
- name: host_email
|
|
data_type: character varying
|
|
description: Email of the user
|
|
|
|
- name: phone_number
|
|
data_type: character varying
|
|
description: Phone number of the user
|
|
|
|
- name: joined_at_utc
|
|
data_type: timestamp without time zone
|
|
description: Date and time the user joined
|
|
|
|
- name: joined_date_utc
|
|
data_type: date
|
|
description: Date the user joined
|
|
|
|
- name: check_in_cover_added_date_utc
|
|
data_type: date
|
|
description: Date the user first included check-in cover
|
|
|
|
- name: billing_town
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: company_name
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: id_accommodation
|
|
data_type: bigint
|
|
description: "Id of the accommodation or listing. It's the unique key for this model."
|
|
data_tests:
|
|
- not_null
|
|
- unique
|
|
|
|
- name: is_active
|
|
data_type: boolean
|
|
description: "Boolean to indicate if the accommodation is active or not"
|
|
|
|
- name: friendly_name
|
|
data_type: character varying
|
|
description: "Name of the accommodation"
|
|
|
|
- name: country_name
|
|
data_type: character varying
|
|
description: "Name of the country where the accommodation is located."
|
|
|
|
- name: town
|
|
data_type: character varying
|
|
description: "Town in which the accommodation is located"
|
|
|
|
- name: postcode
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: address_line_1
|
|
data_type: character varying
|
|
description: ""
|
|
|
|
- name: check_in_cover_purchased
|
|
data_type: bigint
|
|
description: "Count of how many Check-in covers have been
|
|
purchased for this accommodation"
|
|
|
|
- name: core__host_booking_fees
|
|
description: Bookings that have been processed by the Superhog backend.
|
|
Each record matches one booking and has information on host
|
|
booking fees, when they were charged and the currency used by
|
|
the host.
|
|
|
|
columns:
|
|
- name: id_booking
|
|
data_type: bigint
|
|
description: "The unique, Superhog generated id for this booking."
|
|
data_tests:
|
|
- unique
|
|
- not_null
|
|
|
|
- name: id_user_guest
|
|
data_type: character varying
|
|
description: The UUID of the Superhog user playing the guest role in the booking.
|
|
|
|
- name: id_user_host
|
|
data_type: character varying
|
|
description: The UUID of the Superhog user playing the host role in the booking.
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: id_accommodation
|
|
data_type: bigint
|
|
description: The ID of the booked listing.
|
|
|
|
- name: booking_state
|
|
data_type: character varying
|
|
description:
|
|
"State in which the booking is, could be either of the following:
|
|
- Approved
|
|
- NotApproved
|
|
- Cancelled
|
|
- Rejected
|
|
- NoFlags
|
|
- Flagged
|
|
- IncompleteInformation"
|
|
data_tests:
|
|
- accepted_values:
|
|
values:
|
|
- "Approved"
|
|
- "NotApproved"
|
|
- "Cancelled"
|
|
- "Rejected"
|
|
- "NoFlags"
|
|
- "Flagged"
|
|
- "IncompleteInformation"
|
|
|
|
- name: is_duplicate_booking
|
|
data_type: boolean
|
|
description: |
|
|
A flag that identifies whether the booking is a duplicate.
|
|
A booking is considered a duplicate if there's an older booking with the same user,
|
|
accomodation and check-in date. If there are two or more bookings with the same user,
|
|
accomodation and check-in date, the oldest one will have False as a value in this field,
|
|
and the other ones will have True as a value in this Failed."
|
|
Put simply, if you don't want to receive duplicates, filter this field to False.
|
|
|
|
- name: booking_fee_local
|
|
data_type: numeric
|
|
description: "The fee to apply to the booking, in host currency."
|
|
|
|
- name: account_currency_iso4217
|
|
data_type: character varying
|
|
description: "Currency used by host/pm/platform users."
|
|
|
|
- name: booking_fee_in_gbp
|
|
data_type: numeric
|
|
description: "The fee to apply to the booking, in GBP"
|
|
|
|
- name: booking_fee_charge_at_utc
|
|
data_type: timestamp without time zone
|
|
description: |
|
|
The point in time in which the booking should be invoiced.
|
|
|
|
This could be the check-in date of the booking or the date in which the guest verification
|
|
started, depending on the billing settings of the host.
|
|
|
|
- name: booking_fee_charge_date_utc
|
|
data_type: date
|
|
description: |
|
|
The date in which the booking should be invoiced.
|
|
|
|
This could be the check-in date of the booking or the date in which the guest verification
|
|
started, depending on the billing settings of the host.
|
|
|
|
- name: core__new_dash_user_overview
|
|
description: |
|
|
This model allows for minimum tracking of how the new dash initative is
|
|
performing in the different migrations.
|
|
|
|
It's a user-centric model in which, for each user, we retrieve some
|
|
basic performance indicators in the form of listings and bookings.
|
|
|
|
columns:
|
|
- name: id_user_host
|
|
data_type: string
|
|
description: |
|
|
The unique identifier of this table. It corresponds to the host users
|
|
that have been migrated to the New Dashboard.
|
|
data_tests:
|
|
- not_null
|
|
- unique
|
|
|
|
- name: id_deal
|
|
data_type: character varying
|
|
description: The ID for the Deal.
|
|
|
|
- name: user_migration_phase
|
|
data_type: string
|
|
description: |
|
|
The migration phase in which this user was migrated, for informative
|
|
purposes.
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: has_user_moved_from_old_dash
|
|
data_type: boolean
|
|
description: |
|
|
Flag to determine if this user host is in New Dash and has
|
|
been moved from the old dash.
|
|
|
|
- name: user_estimated_migration_date_utc
|
|
data_type: date
|
|
description: |
|
|
The estimated date in which this user was migrated.
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: deal_lifecycle_state
|
|
data_type: character varying
|
|
description: |
|
|
Contains the lifecycle state of a deal. The accepted values are:
|
|
01-New, 02-Never Booked, 04-Active, 05-Churning, 06-Inactive,
|
|
07-Reactivated, 99-Not in Husbpot.
|
|
data_tests:
|
|
- not_null
|
|
- accepted_values:
|
|
values:
|
|
- 01-New
|
|
- 02-Never Booked
|
|
- 04-Active
|
|
- 05-Churning
|
|
- 06-Inactive
|
|
- 07-Reactivated
|
|
- 99-Not in HubSpot
|
|
|
|
- name: has_active_pms
|
|
data_type: boolean
|
|
description: |
|
|
Does the host have an active associated PMS.
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: active_pms_list
|
|
data_type: string
|
|
description: |
|
|
Name of the active PMS associated with the host. It can have more than
|
|
one PMS associated with it. It can be null if it doesn't have any PMS associated.
|
|
|
|
- name: company_name
|
|
data_type: string
|
|
description: |
|
|
Information about the host user.
|
|
|
|
- name: first_name
|
|
data_type: string
|
|
description: |
|
|
Information about the host user.
|
|
|
|
- name: last_name
|
|
data_type: string
|
|
description: |
|
|
Information about the host user.
|
|
|
|
- name: email
|
|
data_type: string
|
|
description: |
|
|
Information about the host user.
|
|
|
|
- name: account_currency
|
|
data_type: string
|
|
description: |
|
|
Currency associated to the host user.
|
|
|
|
- name: total_user_product_bundles
|
|
data_type: integer
|
|
description: |
|
|
Count of product bundles that this user has or has had.
|
|
It contains both active and historic cases.
|
|
|
|
- name: total_active_user_product_bundles
|
|
data_type: integer
|
|
description: |
|
|
Count of product bundles that this user currently has.
|
|
It contains only currently active cases.
|
|
|
|
- name: total_listings
|
|
data_type: integer
|
|
description: |
|
|
Count of listings that the user owns or has owned.
|
|
|
|
- name: total_active_listings
|
|
data_type: integer
|
|
description: |
|
|
Count of listings that the user owns.
|
|
It contains only those that can accept bookings (hard
|
|
activation - not to be confused with activity-based
|
|
segmentation).
|
|
|
|
- name: total_active_listings_with_active_product_bundle
|
|
data_type: integer
|
|
description: |
|
|
Count of active listings that currently have an active product bundle.
|
|
|
|
- name: total_active_listings_with_active_product_bundle_with_paid_service
|
|
data_type: integer
|
|
description: |
|
|
Count of active listings that currently have an active paid service
|
|
product bundle.
|
|
|
|
- name: has_active_listings
|
|
data_type: integer
|
|
description: |
|
|
Integer-based flag version of total_active_listings.
|
|
|
|
- name: has_active_listings_with_active_product_bundle_applied
|
|
data_type: integer
|
|
description: |
|
|
Integer-based flag version of
|
|
total_active_listings_with_active_product_bundle.
|
|
|
|
- name: has_active_listings_with_active_paid_service_applied
|
|
data_type: integer
|
|
description: |
|
|
Integer-based flag version of
|
|
total_active_listings_with_active_product_bundle_with_paid_service.
|
|
|
|
# To be deleted from here
|
|
- name: total_listings_with_product_bundle_with_paid_service
|
|
data_type: integer
|
|
description: |
|
|
Count of listings that have, or have had, a paid service
|
|
product bundle activated.
|
|
|
|
- name: total_listings_with_active_product_bundle_with_paid_service
|
|
data_type: integer
|
|
description: |
|
|
Count of listings that currently have an active paid service
|
|
product bundle.
|
|
|
|
- name: has_listings_with_paid_service_applied
|
|
data_type: integer
|
|
description: |
|
|
Integer-based flag version of total_listings_with_product_bundle_with_paid_service.
|
|
|
|
- name: has_listings_with_active_paid_service_applied
|
|
data_type: integer
|
|
description: |
|
|
Integer-based flag version of total_listings_with_active_product_bundle_with_paid_service.
|
|
# To be deleted until here
|
|
- name: total_bookings_with_product_bundle
|
|
data_type: integer
|
|
description: |
|
|
Count of bookings that have a product bundle associated.
|
|
|
|
- name: total_bookings_with_product_bundle_with_paid_service
|
|
data_type: integer
|
|
description: |
|
|
Count of bookings that have a product bundle associated that contain
|
|
a paid service.
|
|
|
|
- name: has_bookings_with_product_bundle
|
|
data_type: integer
|
|
description: |
|
|
Integer-based flag version of total_bookings_with_product_bundle.
|
|
|
|
- name: has_bookings_with_product_bundle_with_paid_service
|
|
data_type: integer
|
|
description: |
|
|
Integer-based flag version of total_bookings_with_product_bundle_with_paid_service.
|
|
|
|
- name: core__accommodations_activity
|
|
description: |
|
|
This model provides a detailed information on listings, including their hosts,
|
|
and related booking activity. It contains identifiers, geographic information,
|
|
host details, and booking counts categorized by status.
|
|
|
|
columns:
|
|
- name: id_accommodation
|
|
data_type: bigint
|
|
description: "The unique identifier of the listing."
|
|
data_tests:
|
|
- unique
|
|
- not_null
|
|
|
|
- name: id_user_host
|
|
data_type: text
|
|
description: "The unique identifier of the host associated with the listing."
|
|
|
|
- name: id_deal
|
|
data_type: character varying
|
|
description: |
|
|
The primary identifier of the B2B client (deal). A deal can be linked to multiple hosts,
|
|
while a host can have at most one deal or none. This field can be null if there is no deal.
|
|
|
|
- name: company_name
|
|
data_type: character varying
|
|
description: |
|
|
The name of the company associated with the host. This value may sometimes match
|
|
the host's first name, last name, a combination of both, or be entirely different.
|
|
It can also be null or empty.
|
|
|
|
- name: email
|
|
data_type: character varying
|
|
description: "The email address of the host."
|
|
|
|
- name: first_name
|
|
data_type: character varying
|
|
description: "The first name of the host."
|
|
|
|
- name: last_name
|
|
data_type: character varying
|
|
description: "The last name of the host."
|
|
|
|
- name: is_active
|
|
data_type: boolean
|
|
description: |
|
|
Indicates whether the listing is currently active.
|
|
|
|
- name: friendly_name
|
|
data_type: character varying
|
|
description: "A user-friendly name assigned to the listing."
|
|
|
|
- name: country_name
|
|
data_type: character varying
|
|
description: "The full name of the country where the listing is located."
|
|
|
|
- name: town
|
|
data_type: character varying
|
|
description: "The town or city where the listing is located."
|
|
|
|
- name: address_line_1
|
|
data_type: character varying
|
|
description: "The first line of the listing's address."
|
|
|
|
- name: address_line_2
|
|
data_type: character varying
|
|
description: "The second line of the listing's address, if applicable."
|
|
|
|
- name: country_iso_2
|
|
data_type: character varying
|
|
description: "The two-letter ISO 3166-1 country code representing the listing's country."
|
|
|
|
- name: postcode
|
|
data_type: character varying
|
|
description: "The postal code of the listing's location."
|
|
|
|
- name: currency_iso4217
|
|
data_type: character varying
|
|
description: "The three-letter ISO 4217 currency code for transactions related to the listing."
|
|
|
|
- name: created_date_utc
|
|
data_type: date
|
|
description: "The date when the listing was first created."
|
|
|
|
- name: approved_bookings
|
|
data_type: bigint
|
|
description: "The total number of bookings with status approved for this accommodation."
|
|
|
|
- name: cancelled_bookings
|
|
data_type: bigint
|
|
description: "The total number of bookings with status cancelled for this accommodation."
|
|
|
|
- name: flagged_bookings
|
|
data_type: bigint
|
|
description: "The total number of bookings with status flagged for this accommodation."
|
|
|
|
- name: incomplete_information_bookings
|
|
data_type: bigint
|
|
description: "The total number of bookings with status incomplete information for this accommodation."
|
|
|
|
- name: no_flags_bookings
|
|
data_type: bigint
|
|
description: "The total number of bookings with status no flags for this accommodation."
|
|
|
|
- name: not_approved_bookings
|
|
data_type: bigint
|
|
description: "The total number of bookings with status not approved for this accommodation."
|
|
|
|
- name: rejected_bookings
|
|
data_type: bigint
|
|
description: "The total number of bookings with status rejected for this accommodation."
|
|
|
|
- name: total_bookings
|
|
data_type: bigint
|
|
description: "The total number of bookings for this accommodation."
|
|
|
|
- name: core__booking_details
|
|
description: |
|
|
"Contains detailed information about each booking, including host
|
|
and guest details, accommodation, and verification request data."
|
|
|
|
columns:
|
|
- name: id_booking
|
|
data_type: bigint
|
|
description: "The unique, Superhog generated id for this booking."
|
|
data_tests:
|
|
- unique
|
|
- not_null
|
|
|
|
- name: id_user_host
|
|
data_type: text
|
|
description: "The unique user ID for the Host."
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: id_deal
|
|
data_type: character varying
|
|
description:
|
|
"The ID of the deal of the user. It only applies to client accounts.
|
|
Can be null."
|
|
|
|
- name: id_user_guest
|
|
data_type: text
|
|
description: "The unique, Superhog generated id for the guest"
|
|
|
|
- name: id_accommodation
|
|
data_type: bigint
|
|
description: "Id of the accommodation or listing."
|
|
|
|
- name: id_verification_request
|
|
data_type: bigint
|
|
description: |
|
|
The identifier of the verification request. It acts as Foreign Key to
|
|
Verification Request table. It can be null.
|
|
|
|
- name: booking_state
|
|
data_type: character varying
|
|
description:
|
|
"State in which the booking is, could be either of the following:
|
|
- Approved
|
|
- NotApproved
|
|
- Cancelled
|
|
- Rejected
|
|
- NoFlags
|
|
- Flagged
|
|
- IncompleteInformation"
|
|
data_tests:
|
|
- accepted_values:
|
|
values:
|
|
- "Approved"
|
|
- "NotApproved"
|
|
- "Cancelled"
|
|
- "Rejected"
|
|
- "NoFlags"
|
|
- "Flagged"
|
|
- "IncompleteInformation"
|
|
|
|
- name: is_accommodation_active
|
|
data_type: boolean
|
|
description: "Boolean value indicating if the accommodation is active."
|
|
|
|
- name: checkin_date_utc
|
|
data_type: date
|
|
description: "Date of check-in of the booking."
|
|
|
|
- name: checkout_date_utc
|
|
data_type: date
|
|
description: "Date of check-out of the booking."
|
|
|
|
- name: booking_nights
|
|
data_type: integer
|
|
description: "Number of nights of the booking."
|
|
|
|
- name: created_date_utc
|
|
data_type: timestamp without time zone
|
|
description: "Date when the booking was created."
|
|
|
|
- name: host_first_name
|
|
data_type: character varying
|
|
description: "First name of the host."
|
|
|
|
- name: host_last_name
|
|
data_type: character varying
|
|
description: "Last name of the host."
|
|
|
|
- name: host_email
|
|
data_type: character varying
|
|
description: "Email of the host."
|
|
|
|
- name: company_name
|
|
data_type: character varying
|
|
description: "The company name."
|
|
|
|
- name: guest_first_name
|
|
data_type: character varying
|
|
description: "First name of the guest."
|
|
|
|
- name: guest_last_name
|
|
data_type: character varying
|
|
description: "Last name of the guest."
|
|
|
|
- name: guest_email
|
|
data_type: character varying
|
|
description: "Email of the guest."
|
|
|
|
- name: guest_billing_country
|
|
data_type: character varying
|
|
description: "Billing country of the guest."
|
|
|
|
- name: guest_billing_town
|
|
data_type: character varying
|
|
description: "Billing town of the guest."
|
|
|
|
- name: friendly_name
|
|
data_type: character varying
|
|
description: "Name of the listing."
|
|
|
|
- name: accommodation_country
|
|
data_type: character varying
|
|
description: "Country of the listing"
|
|
|
|
- name: accommodation_address
|
|
data_type: character varying
|
|
description: "Address of the listing"
|
|
|
|
- name: is_verification_request_complete
|
|
data_type: boolean
|
|
description: "True if the verification request is considered complete,
|
|
AKA the guest has finished the full guest journey."
|
|
|
|
- name: verification_estimated_started_date_utc
|
|
data_type: date
|
|
description: "The estimated date on which the guest started the guest journey."
|
|
|
|
- name: verification_estimated_completed_date_utc
|
|
data_type: date
|
|
description: "The estimated date on which the guest finished the guest journey."
|
|
|
|
- name: days_to_complete_verification
|
|
data_type: numeric
|
|
description: "Number of days it took to complete the verification."
|
|
|
|
- name: link_used_date_utc
|
|
data_type: date
|
|
description: "The date on which the guest used the link for the verification."
|
|
|
|
- name: verification_request_booking_source
|
|
data_type: text
|
|
description: Source type of host of the booking, this could be either;
|
|
- PMS
|
|
- OSL
|
|
- API/MANUAL
|
|
data_tests:
|
|
- accepted_values:
|
|
values:
|
|
- "PMS"
|
|
- "OSL"
|
|
- "API/MANUAL"
|
|
|
|
- name: chose_deposit
|
|
data_type: boolean
|
|
description: "Boolean value indicating if the guest chose Deposit payment validation."
|
|
|
|
- name: chose_fee
|
|
data_type: boolean
|
|
description: "Boolean value indicating if the guest chose Fee payment validation."
|
|
|
|
- name: chose_waiver
|
|
data_type: boolean
|
|
description: "Boolean value indicating if the guest chose Waiver payment validation."
|
|
|
|
- name: chose_no_cover
|
|
data_type: boolean
|
|
description: "Boolean value indicating if the guest chose No Cover payment validation."
|
|
|
|
- name: chose_checkin_cover
|
|
data_type: boolean
|
|
description: "Boolean value indicating if the guest chose CheckIn Cover."
|
|
|
|
- name: core__payments
|
|
description: |
|
|
A table holding payment details for guest journeys, including amounts in both
|
|
transaction currency and GBP, host and guest information, and payment status.
|
|
Currency conversions are done using using data from xexe.com.
|
|
|
|
columns:
|
|
- name: id_payment
|
|
data_type: bigint
|
|
description: Unique identifier for the payment.
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: payment_reference
|
|
data_type: character varying
|
|
description: Unique reference code associated with the payment.
|
|
|
|
- name: verification_payment_type
|
|
data_type: character varying
|
|
description: Type of payment verification, categorizing the transaction.
|
|
data_tests:
|
|
- accepted_values:
|
|
values:
|
|
- "Waiver"
|
|
- "Deposit"
|
|
- "CheckInCover"
|
|
- "Fee"
|
|
|
|
- name: is_host_taking_waiver_risk
|
|
data_type: boolean
|
|
description: Boolean indicating whether the host is taking the risk
|
|
|
|
- name: payaway_percentage
|
|
data_type: numeric
|
|
description: Percentage of the payment that goes to Superhog.
|
|
|
|
- name: payaway_minimum_commission_local_curr
|
|
data_type: numeric
|
|
description: Minimum commission amount in local currency.
|
|
|
|
- name: payment_status
|
|
data_type: character varying
|
|
description: Current status of the payment (e.g., pending, paid, refunded).
|
|
|
|
- name: payment_due_date_utc
|
|
data_type: date
|
|
description: The due date for the payment, in UTC.
|
|
|
|
- name: payment_paid_date_utc
|
|
data_type: date
|
|
description: The date when the payment was successfully made, in UTC.
|
|
|
|
- name: refund_payment_reference
|
|
data_type: date
|
|
description: The reference code associated with the refund payment.
|
|
|
|
- name: refund_due_date_utc
|
|
data_type: date
|
|
description: The due date for the refund payment, in UTC.
|
|
|
|
- name: payment_refunded_date_utc
|
|
data_type: date
|
|
description: The date when the payment was refunded, in UTC.
|
|
|
|
- name: total_amount_in_txn_currency
|
|
data_type: numeric
|
|
description: |
|
|
The total amount of the payment in local currency.
|
|
This includes taxes if applicable.
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: total_amount_in_gbp
|
|
data_type: numeric
|
|
description: |
|
|
The total amount of the payment in GBP.
|
|
This includes taxes if applicable.
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: amount_without_taxes_in_txn_currency
|
|
data_type: numeric
|
|
description: |
|
|
The net amount of the payment without taxes, in local currency.
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: amount_without_taxes_in_gbp
|
|
data_type: numeric
|
|
description: |
|
|
The net amount of the payment without taxes, in GBP.
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: tax_amount_in_txn_currency
|
|
data_type: numeric
|
|
description: |
|
|
The tax portion of the payment, in local currency.
|
|
Will be 0 if no taxes apply.
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: tax_amount_in_gbp
|
|
data_type: numeric
|
|
description: |
|
|
The tax portion of the payment, in GBP. Will be 0 if no
|
|
taxes apply.
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: amount_due_to_host_in_txn_currency
|
|
data_type: numeric
|
|
description: |
|
|
The amount payable to the host with taxes, in local currency.
|
|
|
|
- name: amount_due_to_host_in_gbp
|
|
data_type: numeric
|
|
description: |
|
|
The amount payable to the host with taxes, in GBP.
|
|
|
|
- name: amount_due_to_host_without_taxes_in_txn_currency
|
|
data_type: numeric
|
|
description: |
|
|
The amount payable to the host without taxes, in local currency.
|
|
|
|
- name: amount_due_to_host_without_taxes_in_gbp
|
|
data_type: numeric
|
|
description: |
|
|
The amount payable to the host without taxes, in GBP.
|
|
|
|
- name: superhog_fee_in_txn_currency
|
|
data_type: numeric
|
|
description: |
|
|
The service fee charged by Superhog with taxes, in local currency.
|
|
|
|
- name: superhog_fee_in_gbp
|
|
data_type: numeric
|
|
description: |
|
|
The service fee charged by Superhog with taxes, in GBP.
|
|
|
|
- name: superhog_fee_without_taxes_in_txn_currency
|
|
data_type: numeric
|
|
description: |
|
|
The service fee charged by Superhog without taxes, in local currency.
|
|
|
|
- name: superhog_fee_without_taxes_in_gbp
|
|
data_type: numeric
|
|
description: |
|
|
The service fee charged by Superhog without taxes, in GBP.
|
|
|
|
- name: currency
|
|
data_type: text
|
|
description: |
|
|
The ISO 4217 currency code (e.g., GBP, USD, EUR) in which the payment
|
|
was originally made.
|
|
|
|
- name: exchange_rate_to_gbp
|
|
data_type: numeric
|
|
description: |
|
|
The exchange rate used to convert the payment amount from local currency
|
|
to GBP.
|
|
|
|
- name: id_booking
|
|
data_type: bigint
|
|
description: The unique, Superhog generated id for this booking.
|
|
Can be null for verification request not related to a booking.
|
|
|
|
- name: booking_state
|
|
data_type: character varying
|
|
description: "State in which the booking is"
|
|
|
|
- name: is_verification_request_complete
|
|
data_type: boolean
|
|
description: "True if the verification request is considered
|
|
complete, AKA the guest has finished the full guest journey."
|
|
|
|
- name: id_user_host
|
|
data_type: character varying
|
|
description: |
|
|
The unique identifier of the host receiving the payment.
|
|
|
|
- name: id_deal
|
|
data_type: character varying
|
|
description: |
|
|
Main identifier of the B2B clients. A Deal can have multiple Hosts.
|
|
A Host can have only 1 Deal or no Deal at all. This field can be null.
|
|
|
|
- name: host_first_name
|
|
data_type: character varying
|
|
description: First name of the host receiving the payment.
|
|
|
|
- name: host_last_name
|
|
data_type: character varying
|
|
description: Last name of the host receiving the payment.
|
|
|
|
- name: host_email
|
|
data_type: character varying
|
|
description: Email address of the host receiving the payment.
|
|
|
|
- name: company_name
|
|
data_type: character varying
|
|
description: |
|
|
The company name of the host.
|
|
|
|
- name: host_country
|
|
data_type: character varying
|
|
description: |
|
|
The country name of the host.
|
|
|
|
- name: guest_first_name
|
|
data_type: character varying
|
|
description: First name of the guest making the payment.
|
|
|
|
- name: guest_last_name
|
|
data_type: character varying
|
|
description: Last name of the guest making the payment.
|
|
|
|
- name: guest_email
|
|
data_type: character varying
|
|
description: Email address of the guest making the payment.
|
|
|
|
- name: guest_billing_country
|
|
data_type: text
|
|
description: |
|
|
The country name of the guest's billing address.
|
|
|
|
- name: guest_billing_town
|
|
data_type: text
|
|
description: |
|
|
The town or city name of the guest's billing address.
|
|
|
|
- name: id_accommodation
|
|
data_type: character varying
|
|
description: |
|
|
"Id of the accommodation or listing."
|
|
|
|
- name: accommodation_name
|
|
data_type: character varying
|
|
description: |
|
|
A user-friendly name for the booking or transaction, often used for
|
|
display purposes.
|
|
|
|
- name: accommodation_country
|
|
data_type: text
|
|
description: |
|
|
The country name of the accommodation.
|
|
|
|
- name: accommodation_town
|
|
data_type: text
|
|
description: |
|
|
The town or city name of the accommodation.
|
|
|
|
- name: accommodation_address
|
|
data_type: character varying
|
|
description: |
|
|
The first line of the property address associated with the payment.
|
|
|
|
- name: accommodation_postcode
|
|
data_type: character varying
|
|
description: |
|
|
The postal code of the property address associated with the payment
|
|
for the booking.
|
|
|
|
- name: check_in_date_utc
|
|
data_type: date
|
|
description: The scheduled check-in date of the guest, in UTC.
|
|
|
|
- name: check_out_date_utc
|
|
data_type: date
|
|
description: The scheduled check-out date of the guest, in UTC.
|
|
|
|
- name: host_currency
|
|
data_type: character varying
|
|
description: |
|
|
The currency in which the host receives their payment (may differ from
|
|
the transaction currency).
|
|
|
|
- name: core__active_property_managers_system
|
|
description: |
|
|
This model contains information about active property managers systems (PMS)
|
|
and their associated hosts.
|
|
It includes details about the host, their account type, company,
|
|
billing information, and the number of accommodations they manage.
|
|
columns:
|
|
- name: active_pms_name
|
|
data_type: text
|
|
description: |
|
|
The name of the active property management system.
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: id_user_host
|
|
data_type: character varying
|
|
description: |
|
|
The unique ID for the host.
|
|
data_tests:
|
|
- not_null
|
|
- unique
|
|
|
|
- name: id_deal
|
|
data_type: character varying
|
|
description: |
|
|
Main identifier of the B2B clients. A Deal can have multiple Hosts.
|
|
A Host can have only 1 Deal or no Deal at all. This field can be null.
|
|
|
|
- name: account_type
|
|
data_type: character varying
|
|
description: |
|
|
Name of the account type. Can be null and might be not up-to-date.
|
|
|
|
- name: first_name
|
|
data_type: character varying
|
|
description: |
|
|
First name of the Host.
|
|
|
|
- name: last_name
|
|
data_type: character varying
|
|
description: |
|
|
Last name of the Host.
|
|
|
|
- name: company_name
|
|
data_type: character varying
|
|
description: |
|
|
Name of the company. In some cases, it's the same as the first_name,
|
|
the last_name, a concatenation of both, or something different.
|
|
Can be null and empty.
|
|
|
|
- name: email
|
|
data_type: character varying
|
|
description: |
|
|
Email of the Host.
|
|
|
|
- name: billing_country_name
|
|
data_type: character varying
|
|
description: |
|
|
Name of the country in which the Host is billed.
|
|
In some cases it's null.
|
|
|
|
- name: billing_country_iso_3
|
|
data_type: character varying
|
|
description: |
|
|
ISO 3166-1 alpha-3 country code in which the Host is billed.
|
|
In some cases it's null.
|
|
|
|
- name: joined_date_utc
|
|
data_type: date
|
|
description: |
|
|
Date of when the Host user joined Superhog.
|
|
|
|
- name: booking_count
|
|
data_type: bigint
|
|
description: |
|
|
The number of bookings from the host made through the PMS.
|
|
|
|
- name: accommodation_count
|
|
data_type: bigint
|
|
description: |
|
|
The number of accommodations managed by the host.
|
|
|
|
- name: core__guest_journey_payments
|
|
description: |
|
|
A model that provides all payments that go through a Guest Journey.
|
|
This model unifies both Verification Product Payments (Waiver, Deposit)
|
|
and Guest Product Payments (Check In Cover, etc).
|
|
|
|
The different amounts are available in the transaction currency (the currency
|
|
used by the guest to pay) and in GBP. Additionally, this model provides tax
|
|
logic computation to convert amounts with taxes to amounts without taxes.
|
|
|
|
You can find out more about Guest Tax calculation here:
|
|
https://www.notion.so/knowyourguest-superhog/Guest-Services-Taxes-How-to-calculate-a5ab4c049d61427fafab669dbbffb3a2?pvs=4
|
|
|
|
columns:
|
|
- name: id_guest_journey_payment
|
|
data_type: text
|
|
description: |
|
|
Unique identifier for the guest journey payment.
|
|
It's a built-in unique ID that means nothing outside DWH.
|
|
It combines the id_verification_product_payment and the
|
|
id_guest_journey_payment into a unique ID by adding the prefix
|
|
"gpp" for Guest Product Payments and "vpp" for Verification Product
|
|
Payments.
|
|
data_tests:
|
|
- unique
|
|
- not_null
|
|
|
|
- name: guest_journey_product_type
|
|
data_type: text
|
|
description: |
|
|
Type of the product, either GUEST_PRODUCT or
|
|
VERIFICATION_PRODUCT.
|
|
It cannot be null.
|
|
data_tests:
|
|
- not_null
|
|
- accepted_values:
|
|
values:
|
|
- GUEST_PRODUCT
|
|
- VERIFICATION_PRODUCT
|
|
|
|
- name: product_name
|
|
data_type: text
|
|
description: |
|
|
Name of the guest journey product that has a
|
|
payment.
|
|
It cannot be null. Some old historical values
|
|
might be categorised as UNKNOWN.
|
|
data_tests:
|
|
- not_null
|
|
- accepted_values:
|
|
values:
|
|
- FEE
|
|
- DEPOSIT
|
|
- WAIVER
|
|
- CHECKINCOVER
|
|
- STAYDISRUPT
|
|
- UNKNOWN
|
|
|
|
- name: id_verification_product_payment
|
|
data_type: bigint
|
|
description: |
|
|
The ID for Verification Product Payments.
|
|
It cannot be null for Product Types equal to VERIFICATION_PRODUCT.
|
|
It's null for Product Types equal to GUEST_PRODUCT.
|
|
data_tests:
|
|
- not_null:
|
|
where: "guest_journey_product_type = 'VERIFICATION_PRODUCT'"
|
|
- is_null:
|
|
where: "guest_journey_product_type = 'GUEST_PRODUCT'"
|
|
|
|
- name: id_guest_product_payment
|
|
data_type: text
|
|
description: |
|
|
The ID for Guest Product Payments.
|
|
It's a built-in ID that concatenates the original ID with a prefix
|
|
depending on the source, to avoid clashes. This ID does not make
|
|
sense outside of DWH.
|
|
The prefix used is "leg_" for "legacy" Verification To Payment,
|
|
which corresponds to the historical CheckInCover that were considered
|
|
as verification payment, rather than Guest Products.
|
|
For the Guest Product Payments that follow the usual Guest Product
|
|
flow, no prefix is added. However, keep in mind that the field is
|
|
in text format.
|
|
It cannot be null for Product Types equal to GUEST_PRODUCT.
|
|
It's null for Product Types equal to VERIFICATION_PRODUCT.
|
|
data_tests:
|
|
- not_null:
|
|
where: "guest_journey_product_type = 'GUEST_PRODUCT'"
|
|
- is_null:
|
|
where: "guest_journey_product_type = 'VERIFICATION_PRODUCT'"
|
|
|
|
- name: id_payment
|
|
data_type: bigint
|
|
description: |
|
|
Unique ID for the payment itself.
|
|
data_tests:
|
|
- unique
|
|
- not_null
|
|
|
|
- name: id_verification_request
|
|
data_type: bigint
|
|
description: |
|
|
Unique identifier of the Verification Request that has a payment.
|
|
Since a Guest Journey is uniquely attributed to a single Verification
|
|
Request, this ID exists for any type of product payment.
|
|
It can be null for same-day payments due to different freshness
|
|
of the sources used to build this model.
|
|
data_tests:
|
|
- not_null:
|
|
where: "date(created_at_utc) < current_date"
|
|
|
|
- name: is_refundable
|
|
data_type: boolean
|
|
description: |
|
|
Indicates whether the payment is refundable or not.
|
|
This does NOT mean that the payment is actually refunded.
|
|
|
|
- name: created_at_utc
|
|
data_type: timestamp without time zone
|
|
description: |
|
|
Timestamp of when the payment was created.
|
|
It cannot be null.
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: updated_at_utc
|
|
data_type: timestamp without time zone
|
|
description: |
|
|
Timestamp of when the payment was last updated.
|
|
It cannot be null.
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: payment_due_at_utc
|
|
data_type: timestamp without time zone
|
|
description: |
|
|
Timestamp of when the payment is due.
|
|
It cannot be null.
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: payment_due_date_utc
|
|
data_type: date
|
|
description: |
|
|
Date of when the payment is due.
|
|
It cannot be null.
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: payment_paid_at_utc
|
|
data_type: timestamp without time zone
|
|
description: |
|
|
Timestamp of when the payment was paid.
|
|
It can be null if the payment has not been paid yet.
|
|
If the payment is in PAID status, then this field
|
|
needs to be filled.
|
|
data_tests:
|
|
- not_null:
|
|
where: "is_paid_status = True"
|
|
|
|
- name: payment_paid_date_utc
|
|
data_type: date
|
|
description: |
|
|
Date of when the payment was paid.
|
|
It can be null if the payment has not been paid yet.
|
|
If the payment is in PAID status, then this field
|
|
needs to be filled.
|
|
data_tests:
|
|
- not_null:
|
|
where: "is_paid_status = True"
|
|
|
|
- name: payment_reference
|
|
data_type: character varying
|
|
description: |
|
|
Reference code associated with the payment.
|
|
It can be null if the payment has not been paid yet.
|
|
|
|
- name: refund_due_at_utc
|
|
data_type: timestamp without time zone
|
|
description: |
|
|
Timestamp of when the refund is due.
|
|
It can be null if the payment has not been refunded.
|
|
|
|
- name: refund_due_date_utc
|
|
data_type: date
|
|
description: |
|
|
Date of when the refund is due.
|
|
It can be null if the payment has not been refunded.
|
|
|
|
- name: payment_refunded_at_utc
|
|
data_type: timestamp without time zone
|
|
description: |
|
|
Timestamp of when the payment was refunded.
|
|
It can be null if the payment has not been refunded.
|
|
|
|
- name: payment_refunded_date_utc
|
|
data_type: date
|
|
description: |
|
|
Date of when the payment was refunded.
|
|
It can be null if the payment has not been refunded.
|
|
|
|
- name: refund_payment_reference
|
|
data_type: character varying
|
|
description: |
|
|
Reference code associated with the refund payment.
|
|
It can be null if the payment has not been refunded.
|
|
|
|
- name: id_user_host
|
|
data_type: character varying
|
|
description: |
|
|
Unique identifier of the Host linked to the Verification
|
|
Request that has a payment.
|
|
It can be null for same-day payments due to different freshness
|
|
of the sources used to build this model.
|
|
data_tests:
|
|
- not_null:
|
|
where: "date(created_at_utc) < current_date"
|
|
|
|
- name: id_user_guest
|
|
data_type: character varying
|
|
description: |
|
|
Unique identifier of the Guest linked to the Verification
|
|
Request that has a payment.
|
|
It cannot be null.
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: currency
|
|
data_type: character varying
|
|
description: |
|
|
The ISO 4217 currency code (e.g., GBP, USD, EUR) in which the payment
|
|
was originally made.
|
|
It can be null for same-day payments due to different freshness
|
|
of the sources used to build this model.
|
|
data_tests:
|
|
- not_null:
|
|
where: "date(created_at_utc) < current_date"
|
|
|
|
- name: payment_status
|
|
data_type: character varying
|
|
description: |
|
|
Current status of the payment (e.g., PAID).
|
|
It cannot be null.
|
|
data_tests:
|
|
- accepted_values:
|
|
values:
|
|
- PAID
|
|
- PAID MANUALLY
|
|
- CANCELLED
|
|
- REFUNDED
|
|
- REFUND FAILED
|
|
- FAILED WITH RETRY
|
|
- FAILED
|
|
- UNKNOWN
|
|
|
|
- name: notes
|
|
data_type: character varying
|
|
description: |
|
|
Notes or comments associated with the payment.
|
|
It can be null if there are no notes.
|
|
|
|
- name: total_amount_in_txn_currency
|
|
data_type: numeric
|
|
description: |
|
|
The total amount due created by the interaction, in the currency
|
|
of the transaction.
|
|
Should we refund the payment, this is also the amount we will give
|
|
back to the guest.
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: total_amount_in_gbp
|
|
data_type: numeric
|
|
description: |
|
|
The total amount due created by the interaction, in GBP.
|
|
Should we refund the payment, this is the GBP equivalent of the
|
|
amount we will give back to the guest, but we won't be paying in
|
|
GBP unless the original payment was in GBP.
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: tax_amount_in_txn_currency
|
|
data_type: numeric
|
|
description: |
|
|
The tax amount applicable to this transaction, in the currency of
|
|
the transaction.
|
|
If the transaction accrues no taxes, will be 0.
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: tax_amount_in_gbp
|
|
data_type: numeric
|
|
description: |
|
|
The tax amount applicable to this transaction, in GBP.
|
|
If the transaction accrues no taxes, will be 0.
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: amount_without_taxes_in_txn_currency
|
|
data_type: numeric
|
|
description: |
|
|
The total amount minus taxes, in the currency of the transaction.
|
|
This is what should be considered net-of-taxes revenue for
|
|
Truvi.
|
|
If the transaction accrues no taxes, will be equal to the field
|
|
total_amount_in_txn_currency.
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: amount_without_taxes_in_gbp
|
|
data_type: numeric
|
|
description: |
|
|
The total amount minus taxes, in GBP.
|
|
This is what should be considered net-of-taxes revenue for
|
|
Truvi.
|
|
If the transaction accrues no taxes, will be equal to the field
|
|
total_amount_in_txn_currency.
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: vat_rate
|
|
data_type: numeric
|
|
description: |
|
|
The applicable VAT rate to this payment. This is inferred from (1)
|
|
which service is the payment related to and (2) what's the billing
|
|
country of the guest.
|
|
data_tests:
|
|
- not_null
|
|
- dbt_expectations.expect_column_values_to_be_between:
|
|
min_value: 0
|
|
max_value: 0.99
|
|
strictly: false
|
|
|
|
- name: is_service_subject_to_vat
|
|
data_type: boolean
|
|
description: |
|
|
Whether the related payment is subject to VAT. For instance,
|
|
deposit payments are not.
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: is_vat_taxed
|
|
data_type: boolean
|
|
description: |
|
|
Syntactic sugar to indicate if there's any VAT on this payment.
|
|
Will be true if so, false if not for any reason (guest country has
|
|
no VAT, the payment is for a deposit, etc.)
|
|
data_tests:
|
|
- not_null
|
|
|
|
- name: is_host_taking_waiver_risk
|
|
data_type: boolean
|
|
description: |
|
|
Boolean indicating whether the host is taking the risk.
|
|
It is always null if the payment is not a Waiver payment.
|
|
data_tests:
|
|
- is_null:
|
|
where: "product_name <> 'WAIVER'"
|
|
|
|
- name: payaway_percentage
|
|
data_type: numeric
|
|
description: |
|
|
Percentage of the payment that goes to Truvi.
|
|
It is always null if the payment is not a Waiver payment.
|
|
data_tests:
|
|
- is_null:
|
|
where: "product_name <> 'WAIVER'"
|
|
|
|
- name: payaway_minimum_commission_in_txn_currency
|
|
data_type: numeric
|
|
description: |
|
|
Minimum commission amount in the payment currency.
|
|
Note that this is converted from Host currency to the payment
|
|
currency for information purposes, but that the Host always gets
|
|
paid in its own currency.
|
|
It is always null if the payment is not a Waiver payment.
|
|
data_tests:
|
|
- is_null:
|
|
where: "product_name <> 'WAIVER'"
|
|
|
|
- name: amount_due_to_host_in_txn_currency
|
|
data_type: numeric
|
|
description: |
|
|
The amount payable to the host in the payment currency.
|
|
Note that this is converted from Host currency to the payment
|
|
currency for information purposes, but that the Host always gets
|
|
paid in its own currency.
|
|
This includes taxes if applicable.
|
|
It is always null if the payment is not a Waiver payment.
|
|
data_tests:
|
|
- is_null:
|
|
where: "product_name <> 'WAIVER'"
|
|
|
|
- name: amount_due_to_host_in_gbp
|
|
data_type: numeric
|
|
description: |
|
|
The amount payable to the host in GBP.
|
|
Note that this is converted from Host currency to GBP for
|
|
information purposes, but that the Host always gets paid
|
|
in its own currency.
|
|
This includes taxes if applicable.
|
|
It is always null if the payment is not a Waiver payment.
|
|
data_tests:
|
|
- is_null:
|
|
where: "product_name <> 'WAIVER'"
|
|
|
|
- name: truvi_fee_in_txn_currency
|
|
data_type: numeric
|
|
description: |
|
|
The service fee charged by Truvi in the payment currency.
|
|
This includes taxes if applicable.
|
|
It is always null if the payment is not a Waiver payment.
|
|
data_tests:
|
|
- is_null:
|
|
where: "product_name <> 'WAIVER'"
|
|
|
|
- name: truvi_fee_in_gbp
|
|
data_type: numeric
|
|
description: |
|
|
The service fee charged by Truvi in GBP.
|
|
This includes taxes if applicable.
|
|
It is always null if the payment is not a Waiver payment.
|
|
data_tests:
|
|
- is_null:
|
|
where: "product_name <> 'WAIVER'"
|
|
|
|
- name: amount_due_to_host_without_taxes_in_txn_currency
|
|
data_type: numeric
|
|
description: |
|
|
The amount payable to the host in the payment currency, without taxes.
|
|
Note that this is converted from Host currency to the payment
|
|
currency for information purposes, but that the Host always gets
|
|
paid in its own currency.
|
|
If the transaction accrues no taxes, will be equal to the field
|
|
amount_due_to_host_in_txn_currency.
|
|
It is always null if the payment is not a Waiver payment.
|
|
data_tests:
|
|
- is_null:
|
|
where: "product_name <> 'WAIVER'"
|
|
|
|
- name: amount_due_to_host_without_taxes_in_gbp
|
|
data_type: numeric
|
|
description: |
|
|
The amount payable to the host in GBP, without taxes.
|
|
Note that this is converted from Host currency to GBP for
|
|
information purposes, but that the Host always gets paid in
|
|
its own currency.
|
|
If the transaction accrues no taxes, will be equal to the field
|
|
amount_due_to_host_in_gbp.
|
|
It is always null if the payment is not a Waiver payment.
|
|
data_tests:
|
|
- is_null:
|
|
where: "product_name <> 'WAIVER'"
|
|
|
|
- name: truvi_fee_without_taxes_in_txn_currency
|
|
data_type: numeric
|
|
description: |
|
|
The service fee charged by Truvi in the payment currency,
|
|
without taxes.
|
|
If the transaction accrues no taxes, will be equal to the field
|
|
truvi_fee_in_txn_currency.
|
|
It is always null if the payment is not a Waiver payment.
|
|
data_tests:
|
|
- is_null:
|
|
where: "product_name <> 'WAIVER'"
|
|
|
|
- name: truvi_fee_without_taxes_in_gbp
|
|
data_type: numeric
|
|
description: |
|
|
The service fee charged by Truvi in GBP, without taxes.
|
|
If the transaction accrues no taxes, will be equal to the field
|
|
truvi_fee_in_gbp.
|
|
It is always null if the payment is not a Waiver payment.
|
|
data_tests:
|
|
- is_null:
|
|
where: "product_name <> 'WAIVER'"
|
|
|
|
- name: is_missing_user_country
|
|
data_type: boolean
|
|
description: |
|
|
True if, for some reason, the user doesn't have an informed
|
|
country.
|
|
The only known, justified reason for this is that the user was
|
|
deleted, along with the billing details.
|
|
If this turns true in any other case, you should really find out
|
|
why the guest doesn't have a billing country.
|
|
data_tests:
|
|
- not_null
|
|
- accepted_values:
|
|
values:
|
|
- false
|
|
where: (are_user_details_deleted != true and are_user_details_deleted is not null)
|
|
|
|
- name: is_missing_vat_rate_for_country
|
|
data_type: boolean
|
|
description: |
|
|
True if the user country is informed, but no VAT rates were found
|
|
for it.
|
|
This has to be a joining issue, since our database for VAT rates
|
|
covers all the countries in the world. We simply assign a 0% rate
|
|
to countries where we don't collect taxes.
|
|
If this turns true in any other case, you should really find out
|
|
what's happening.
|
|
data_tests:
|
|
- not_null
|
|
- accepted_values:
|
|
values:
|
|
- false
|
|
where: (are_user_details_deleted != true and are_user_details_deleted is not null)
|
|
|
|
- name: are_user_details_deleted
|
|
data_type: boolean
|
|
description: |
|
|
True if the user has been deleted, which is a possible explanation
|
|
for why there might be no country informed.
|
|
|
|
- name: is_missing_vat_details_without_known_cause
|
|
data_type: boolean
|
|
description: |
|
|
True if the VAT rate is missing as a fallback for any
|
|
other reason beyond the other one specified in the table.
|
|
|
|
If this turns true, you have an unhandled problem and you should
|
|
fix it.
|
|
|
|
data_tests:
|
|
- not_null
|
|
- accepted_values:
|
|
values:
|
|
- false
|
|
|
|
- name: is_paid_status
|
|
data_type: boolean
|
|
description: |
|
|
A handy boolean that just considers payments that are
|
|
currently in the PAID status. Keep in mind that if the
|
|
payment gets paid and then refunded, this boolean will
|
|
be false as status only reflects the latest transition.
|
|
data_tests:
|
|
- not_null
|