data-dwh-dbt-project/models/reporting/core/schema.yml

2040 lines
66 KiB
YAML
Raw Normal View History

2024-03-13 15:47:58 +01:00
version: 2
models:
- name: core__verification_payments
2024-09-18 12:41:00 +02:00
latest_version: 2
2024-03-13 15:47:58 +01:00
description: |
Payments that have happened as part of the Guest Journey.
Each record matches one payment in a guest journey. For example, if a guest pays a fee and a deposit for a booking, this table will hold two records.
Lookups to dimensions have been denormalized.
The data is mostly coming from Superhog, with money conversion happening through hardcoded rates.
columns:
- name: id_verification_to_payment
data_type: bigint
description: Superhog id for the record that relates this Payment to a Verification.
- name: id_payment
data_type: bigint
description: Superhog id for this Payment.
2025-01-13 16:00:35 +01:00
data_tests:
2024-04-08 09:44:32 +02:00
- unique
- not_null
2024-03-13 15:47:58 +01:00
- name: is_refundable
data_type: boolean
description: Whether they payment is refundable or not.
- name: payment_due_at_utc
data_type: timestamp without time zone
description: The point in time at which this payment had to be paid.
2025-01-13 16:00:35 +01:00
data_tests:
- not_null
2024-03-13 15:47:58 +01:00
- name: payment_due_date_utc
data_type: date
description: The date on which this payment had to be paid.
2025-01-13 16:00:35 +01:00
data_tests:
- not_null
2024-03-13 15:47:58 +01:00
- name: payment_paid_at_utc
data_type: timestamp without time zone
description: The point in time at which this payment was paid.
- name: payment_paid_date_utc
data_type: date
description: The date on which this payment was paid.
- name: payment_reference
data_type: character varying
description: |
The payment reference code in the payment processor.
For Acquired, this is typically and 10-12 digits number.
For Stripe, this is a payment intent code. This is formatted as `pi_3OieViJK46Ulzq6A16IWxeW5`, with the part after `pi_` being 24 digits long.
You can use the Stripe code to match this payment with our Stripe records.
- name: refund_due_at_utc
data_type: timestamp without time zone
description: The point in time at which this payment had to be refunded.
- name: refund_due_date_utc
data_type: date
description: The date on which this payment had to be refunded.
- name: payment_refunded_at_utc
data_type: timestamp without time zone
description: The point in time at which this payment was refunded.
- name: payment_refunded_date_utc
data_type: date
description: The date on which this payment was refunded.
- name: refund_payment_reference
data_type: character varying
description: |
The payment reference for the refund in the payment processor.
For Acquired, this is typically and 10-12 digits number.
For Stripe, this is a refund code. This is formatted as `pyr_3OieViJK46Ulzq6A16IWxeW5` or `re_3OfWeTJK46Ulzq6A02gVvZuk`.
You can use the Stripe code to match this refund with our Stripe records.
- name: id_guest_user
data_type: character varying
description: The UUID of the guest user in the Superhog backend.
2025-01-13 16:00:35 +01:00
data_tests:
- not_null
2024-03-13 15:47:58 +01:00
- name: id_verification
data_type: bigint
description: The ID of the verification that generated this payment.
2025-01-13 16:00:35 +01:00
data_tests:
- not_null
2024-03-13 15:47:58 +01:00
- name: verification_payment_type
data_type: character varying
description: "The payment type. Can be one of: Waiver, Fee, Deposit, Reschedule, Cancellation."
- name: amount_in_txn_currency
data_type: numeric
description: The payment amount in the currency in which the transaction actually happened. If the guest paid in Australian Dollars, this is measured in AUD. (To be decommissioned)
2025-01-13 16:00:35 +01:00
data_tests:
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0
strictly: false
2024-03-13 15:47:58 +01:00
- name: currency
data_type: character varying
description: The currency in which the transaction actually happened. If the guest paid in Australian Dollars, this is measured in AUD.
2025-01-13 16:00:35 +01:00
data_tests:
- not_null
2024-03-13 15:47:58 +01:00
- name: amount_in_gbp
data_type: numeric
description: The payment amount value, converted to GBP, using the exchange rate for the day on which the payment happened.
2025-01-13 16:00:35 +01:00
data_tests:
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0
strictly: false
2024-03-13 15:47:58 +01:00
- name: payment_status
data_type: character varying
description: "The status of the payment. It can be one of: Paid, Refunded, Refund Failed, Cancelled, Paid Manually, Unpaid."
2025-01-13 16:00:35 +01:00
data_tests:
- not_null
2024-03-13 15:47:58 +01:00
- name: notes
data_type: character varying
description: Free text description on the payment. Typically, contains explanations for integration issues with the payment processor.
2024-04-08 09:44:32 +02:00
2024-09-18 12:41:00 +02:00
versions:
- v: 2
columns:
- name: total_amount_in_txn_currency
data_type: numeric
description: The payment amount in the currency in which the transaction actually happened. If the guest paid in Australian Dollars, this is measured in AUD.
2025-01-13 16:00:35 +01:00
data_tests:
2024-09-18 12:41:00 +02:00
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0
strictly: false
- name: amount_without_taxes_in_txn_currency
data_type: numeric
description: The payment amount without taxes in the currency in which the transaction actually happened. If the guest paid in Australian Dollars, this is measured in AUD. (To be decommissioned)
2025-01-13 16:00:35 +01:00
data_tests:
2024-09-18 12:41:00 +02:00
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0
strictly: false
- name: total_amount_in_gbp
data_type: numeric
description: The payment amount value, converted to GBP, using the exchange rate for the day on which the payment happened.
2025-01-13 16:00:35 +01:00
data_tests:
2024-09-18 12:41:00 +02:00
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0
strictly: false
- name: amount_without_taxes_in_gbp
data_type: numeric
description: The payment amount value without taxes, converted to GBP, using the exchange rate for the day on which the payment happened.
2025-01-13 16:00:35 +01:00
data_tests:
2024-09-18 12:41:00 +02:00
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0
strictly: false
- include: all
exclude: [amount_in_txn_currency, amount_in_gbp]
2024-04-08 09:44:32 +02:00
- 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.
2025-01-13 16:00:35 +01:00
data_tests:
2024-04-08 09:44:32 +02:00
- unique
- not_null
2024-04-08 09:44:32 +02:00
- 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
2024-09-12 15:39:49 +02:00
when the booking fee had to be charged.
2024-04-08 09:44:32 +02:00
- 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.
2024-05-06 17:50:08 +02:00
- 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
2024-09-12 15:39:49 +02:00
description: |
2024-05-06 17:50:08 +02:00
Unique, incremental, internal ID for the related verification
request.
2025-01-13 16:00:35 +01:00
data_tests:
- not_null
- unique
2024-05-06 17:50:08 +02:00
- 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
2024-09-12 15:39:49 +02:00
description: |
2024-05-06 17:50:08 +02:00
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
2024-09-12 15:39:49 +02:00
description: |
2024-05-06 17:50:08 +02:00
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
2024-09-12 15:39:49 +02:00
description: |
2024-05-06 17:50:08 +02:00
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
2024-09-12 15:39:49 +02:00
description: |
2024-05-06 17:50:08 +02:00
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
2024-09-12 15:39:49 +02:00
description: |
2024-05-06 17:50:08 +02:00
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
2024-05-06 17:50:08 +02:00
data_type: numeric
2024-09-12 15:39:49 +02:00
description: |
2024-05-06 17:50:08 +02:00
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.
2024-05-06 17:50:08 +02:00
- 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
2024-05-06 17:50:08 +02:00
data_type: numeric
description: The equivalent amount paid by the guest, converted into GBP and without taxes.
2024-05-06 17:50:08 +02:00
- 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
2024-09-12 15:39:49 +02:00
description: |
2024-05-06 17:50:08 +02:00
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
2024-09-12 15:39:49 +02:00
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
2024-09-12 15:39:49 +02:00
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
2024-09-12 15:39:49 +02:00
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
2024-09-12 15:39:49 +02:00
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
2024-09-12 15:39:49 +02:00
description: The date and time at which the guest started the guest journey.
- name: verification_start_date_utc
data_type: date
2024-09-12 15:39:49 +02:00
description: The date on which the guest started the guest journey.
- name: verification_end_at_utc
data_type: timestamp without time zone
2024-09-12 15:39:49 +02:00
description: The date and time at which the guest finished the guest journey.
- name: verification_end_date_utc
data_type: date
2024-09-12 15:39:49 +02:00
description: The date on which the guest finished the guest journey.
- name: link_used_at_utc
data_type: timestamp without time zone
2024-09-12 15:39:49 +02:00
description: The date and time at which the guest used the link for the verification.
- name: link_used_date_utc
data_type: date
2024-09-12 15:39:49 +02:00
description: The date on which the guest used the link for the verification.
- name: expire_at_utc
data_type: timestamp without time zone
2024-09-12 15:39:49 +02:00
description: The date and time at which the link for the verification expires.
- name: expire_date_utc
data_type: date
2024-09-12 15:39:49 +02:00
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
2024-09-12 15:39:49 +02:00
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
2024-09-12 15:39:49 +02:00
description: The date and time at which the verification process was created.
- name: created_date_utc
data_type: date
2024-09-12 15:39:49 +02:00
description: The date on which the verification process was created.
- name: updated_at_utc
data_type: timestamp without time zone
2024-09-12 15:39:49 +02:00
description: The date and time at which the last update on the entry happened.
- name: updated_date_utc
data_type: date
2024-09-12 15:39:49 +02:00
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
2024-09-12 15:39:49 +02:00
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.
2025-01-13 16:00:35 +01:00
data_tests:
2024-06-12 12:13:23 +02:00
- unique
- not_null
2024-09-12 15:39:49 +02:00
- 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
2024-06-12 12:13:23 +02:00
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
2024-09-12 15:39:49 +02:00
description: The date time when the user created it's account in Superhog.
- name: joined_date_utc
data_type: date
2024-09-12 15:39:49 +02:00
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: ""
Merged PR 3909: Fixes created_date_utc and updated_date_utc in SH User and its dependencies # Description The model `stg_core__superhog_user` contained the fields `created_date_utc` and `updated_date_utc`, which were actually timestamps, not dates. This created issues a while ago in KPIs that were fixed by forcing a date conversion at `int_kpis` level, but the source issue remained unfixed. This PR just creates the proper fields in staging, meaning: * `created_at_utc` and `created_date_utc` * `updated_at_utc` and `updated_date_utc` And propagates the changes through all dependencies. On KPIs, it also removes the hardcoded date conversion since it's no longer needed. It also adds the different schema entries on which these fields were already defined. Note I didn't update the staging entry since there's no entry for the rest of the fields. I recommend checking this PR in the commits order. What I've tested: * Unified User and User Host have plenty of dependencies that I've checked one by one, at each dependency layer by using dbt docs. * Run `core__unified_user` and the full execution of +`mtd_aggregated_metrics` What clearly will fail: * There's the famous `Users_dashboard` PBI report that shouldn't exist that has a dependency with `core__unified_user`. This report will fail. But it does not exist. I'd like to drop it once and forever # Checklist - [X] The edited models and dependants run properly with production data. **See above** - [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 - [X] Check if a full-refresh is required after this PR is merged. **The staging model is incremental!** Related work items: #23703
2024-12-31 08:04:03 +00:00
- name: created_at_utc
data_type: timestamp
description: The timestamp when the user was created.
- name: created_date_utc
Merged PR 3909: Fixes created_date_utc and updated_date_utc in SH User and its dependencies # Description The model `stg_core__superhog_user` contained the fields `created_date_utc` and `updated_date_utc`, which were actually timestamps, not dates. This created issues a while ago in KPIs that were fixed by forcing a date conversion at `int_kpis` level, but the source issue remained unfixed. This PR just creates the proper fields in staging, meaning: * `created_at_utc` and `created_date_utc` * `updated_at_utc` and `updated_date_utc` And propagates the changes through all dependencies. On KPIs, it also removes the hardcoded date conversion since it's no longer needed. It also adds the different schema entries on which these fields were already defined. Note I didn't update the staging entry since there's no entry for the rest of the fields. I recommend checking this PR in the commits order. What I've tested: * Unified User and User Host have plenty of dependencies that I've checked one by one, at each dependency layer by using dbt docs. * Run `core__unified_user` and the full execution of +`mtd_aggregated_metrics` What clearly will fail: * There's the famous `Users_dashboard` PBI report that shouldn't exist that has a dependency with `core__unified_user`. This report will fail. But it does not exist. I'd like to drop it once and forever # Checklist - [X] The edited models and dependants run properly with production data. **See above** - [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 - [X] Check if a full-refresh is required after this PR is merged. **The staging model is incremental!** Related work items: #23703
2024-12-31 08:04:03 +00:00
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
Merged PR 3909: Fixes created_date_utc and updated_date_utc in SH User and its dependencies # Description The model `stg_core__superhog_user` contained the fields `created_date_utc` and `updated_date_utc`, which were actually timestamps, not dates. This created issues a while ago in KPIs that were fixed by forcing a date conversion at `int_kpis` level, but the source issue remained unfixed. This PR just creates the proper fields in staging, meaning: * `created_at_utc` and `created_date_utc` * `updated_at_utc` and `updated_date_utc` And propagates the changes through all dependencies. On KPIs, it also removes the hardcoded date conversion since it's no longer needed. It also adds the different schema entries on which these fields were already defined. Note I didn't update the staging entry since there's no entry for the rest of the fields. I recommend checking this PR in the commits order. What I've tested: * Unified User and User Host have plenty of dependencies that I've checked one by one, at each dependency layer by using dbt docs. * Run `core__unified_user` and the full execution of +`mtd_aggregated_metrics` What clearly will fail: * There's the famous `Users_dashboard` PBI report that shouldn't exist that has a dependency with `core__unified_user`. This report will fail. But it does not exist. I'd like to drop it once and forever # Checklist - [X] The edited models and dependants run properly with production data. **See above** - [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 - [X] Check if a full-refresh is required after this PR is merged. **The staging model is incremental!** Related work items: #23703
2024-12-31 08:04:03 +00:00
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: flag_as_problem
data_type: boolean
description: ""
- name: number_of_properties
data_type: bigint
2024-06-12 12:13:23 +02:00
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
2024-09-12 15:39:49 +02:00
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:
2024-07-04 16:41:41 +02:00
- name: id_user_host
data_type: character varying
description: Unique id value for the user
2025-01-13 16:00:35 +01:00
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
2024-07-04 16:41:41 +02:00
- 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
2024-09-12 15:39:49 +02:00
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
2024-09-12 15:39:49 +02:00
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
2025-01-13 16:00:35 +01:00
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
2024-09-12 15:39:49 +02:00
description: Source type of host of the booking, this could be either;
- PMS
- OSL
- API/MANUAL
2025-01-13 16:00:35 +01:00
data_tests:
- not_null
- accepted_values:
2024-09-12 15:39:49 +02:00
values:
- "PMS"
- "OSL"
- "API/MANUAL"
- name: experience_rating
data_type: bigint
2024-09-12 15:39:49 +02:00
description: Guest rating of their experience with Superhog from 1 to 5
- name: guest_comments
data_type: character varying
2024-09-12 15:39:49 +02:00
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
2024-09-12 15:39:49 +02:00
description: Date and time of response creation
- name: updated_at_utc
data_type: timestamp without time zone
2024-09-12 15:39:49 +02:00
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: |
2024-07-25 11:34:07 +02:00
True if guest payed the fee
- name: core__check_in_cover_listings
2024-09-12 15:39:49 +02:00
description: This model contains information about hosts and their listings
2024-07-25 11:34:07 +02:00
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.
2024-09-12 15:39:49 +02:00
This model is restricted to active user so it doesn't include historical
2024-07-25 11:34:07 +02:00
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
2025-01-13 16:00:35 +01:00
data_tests:
2024-07-25 11:34:07 +02:00
- 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
2024-09-12 15:39:49 +02:00
description: Date the user first included check-in cover
2024-07-25 11:34:07 +02:00
- 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."
2025-01-13 16:00:35 +01:00
data_tests:
2024-07-25 11:34:07 +02:00
- 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
2024-09-12 15:39:49 +02:00
description: "Count of how many Check-in covers have been
purchased for this accommodation"
- name: core__host_booking_fees
2024-09-12 15:39:49 +02:00
description: Bookings that have been processed by the Superhog backend.
Each record matches one booking and has information on host
2024-09-12 15:39:49 +02:00
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."
2025-01-13 16:00:35 +01:00
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.
2025-01-13 16:00:35 +01:00
data_tests:
- not_null
- name: id_accommodation
data_type: bigint
description: The ID of the booked listing.
- name: booking_state
data_type: character varying
2024-09-12 15:39:49 +02:00
description:
"State in which the booking is, could be either of the following:
- Approved
- NotApproved
- Cancelled
- Rejected
- NoFlags
- Flagged
- IncompleteInformation"
2025-01-13 16:00:35 +01:00
data_tests:
- accepted_values:
2024-09-12 15:39:49 +02:00
values:
- "Approved"
- "NotApproved"
- "Cancelled"
- "Rejected"
- "NoFlags"
- "Flagged"
- "IncompleteInformation"
- name: is_duplicate_booking
data_type: boolean
2024-09-12 15:39:49 +02:00
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."
2024-08-01 14:32:45 +02:00
- name: booking_fee_in_gbp
data_type: numeric
2024-08-01 14:32:45 +02:00
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.
2025-01-13 16:00:35 +01:00
data_tests:
- not_null
- unique
2024-11-12 17:10:42 +01:00
- 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.
2025-01-13 16:00:35 +01:00
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.
2025-01-13 16:00:35 +01:00
data_tests:
- not_null
2025-01-21 10:12:46 +01:00
- 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.
2024-11-12 16:33:55 +01:00
- 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
2024-09-12 15:39:49 +02:00
segmentation).
- 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_active_listings
data_type: integer
description: |
Integer-based flag version of total_active_listings.
- 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.
- 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.
2024-09-12 15:39:49 +02:00
- 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.
2025-02-03 10:37:25 +01:00
- 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."
2025-02-05 11:53:28 +01:00
- 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."
2025-02-05 12:41:30 +01:00
- name: friendly_name
data_type: character varying
description: "Name of the listing."
2025-02-05 11:53:28 +01:00
- 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."
2025-02-05 16:06:29 +01:00
- name: days_to_complete_verification
data_type: numeric
description: "Number of days it took to complete the verification."
2025-02-05 11:53:28 +01:00
- 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."
2025-02-07 15:15:17 +01:00
- name: core__new_dash_services_offered
description: "This model contains the the services offered in New Dash.
2025-02-10 08:18:11 +01:00
These offers are displayed by different measures, such as the number of users,
2025-02-07 15:15:17 +01:00
accommodations and bookings."
columns:
2025-02-10 08:09:22 +01:00
- name: service_display_name
2025-02-07 15:15:17 +01:00
data_type: text
2025-02-10 08:09:22 +01:00
description: "The name of the New Dash service."
2025-02-07 15:15:17 +01:00
data_tests:
- not_null
- name: number_users
data_type: bigint
description:
"Number of user accounts that have a bundle that considers this service.
The fact that a user has a bundle with the service included does not mean
that the service is active or used. Each user can associate any of their
bundles with any of their accommodations."
2025-02-12 15:16:41 +01:00
- name: number_users_with_service_applied_in_accommodation
2025-02-12 15:00:31 +01:00
data_type: bigint
description:
"Number of user accounts that have a bundle that considers this service
and that bundle is active in at least one active accommodation.
In other words there is at least one active accommodation that offers
this service for this number of users."
2025-02-12 15:03:17 +01:00
2025-02-12 15:16:41 +01:00
- name: number_users_without_service_applied_in_accommodation
2025-02-12 15:00:31 +01:00
data_type: bigint
description:
"Number of user accounts that have a bundle that considers this service
but none of those bundle with the service is active in any active
accommodation.
2025-02-12 15:35:03 +01:00
It is basically the difference between number_users and
number_users_with_service_applied_in_accommodation."
2025-02-12 15:00:31 +01:00
2025-02-07 15:15:17 +01:00
- name: number_accommodations
data_type: bigint
description:
"Number of accommodations or listings that have a bundle that considers
this service."
- name: number_active_accommodations
data_type: bigint
description:
"Number of accommodations or listings that have a bundle that considers
this service and are active."
- name: number_inactive_accommodations
data_type: bigint
description:
"Number of accommodations or listings that have a bundle that considers
this service and are inactive."
- name: number_bookings
data_type: bigint
description: "Number of bookings that have a bundle that considers this service."
2025-02-14 08:35:51 +01:00
- name: number_bookings_with_service_status_protected
2025-02-07 15:15:17 +01:00
data_type: bigint
2025-02-13 17:13:05 +01:00
description: "Number of bookings with status PROTECTED for this service."
2025-02-07 15:15:17 +01:00
2025-02-14 08:35:51 +01:00
- name: number_bookings_with_service_status_rejected
2025-02-07 15:15:17 +01:00
data_type: bigint
2025-02-13 17:13:05 +01:00
description: "Number of bookings with status REJECTED for this service."
2025-02-07 15:15:17 +01:00
2025-02-14 08:35:51 +01:00
- name: number_bookings_with_service_status_no_checks
2025-02-07 15:15:17 +01:00
data_type: bigint
2025-02-13 17:13:05 +01:00
description: "Number of bookings with status NO CHECKS for this service."
2025-02-12 09:09:16 +01:00
2025-02-14 08:35:51 +01:00
- name: number_bookings_with_service_status_no_flags
2025-02-12 09:09:16 +01:00
data_type: bigint
2025-02-13 17:13:05 +01:00
description: "Number of bookings with status NO FLAGS for this service."
2025-02-12 09:09:16 +01:00
2025-02-14 08:35:51 +01:00
- name: number_bookings_with_service_status_paid
2025-02-12 09:09:16 +01:00
data_type: bigint
2025-02-13 17:13:05 +01:00
description: "Number of bookings with status PAID for this service."
2025-02-12 09:09:16 +01:00
2025-02-14 08:35:51 +01:00
- name: number_bookings_with_service_status_pending
2025-02-12 09:09:16 +01:00
data_type: bigint
2025-02-13 17:13:05 +01:00
description: "Number of bookings with status PENDING for this service."
2025-02-12 09:09:16 +01:00
2025-02-14 08:35:51 +01:00
- name: number_bookings_with_service_status_unknown
2025-02-12 09:09:16 +01:00
data_type: bigint
2025-02-13 17:13:05 +01:00
description: "Number of bookings with unknown status for this service."
2025-02-14 08:35:51 +01:00
- name: number_bookings_with_service_status_partially_protected
2025-02-13 17:13:05 +01:00
data_type: bigint
description: "Number of bookings with status PARTIALLY PROTECTED for this service."
2025-02-14 08:35:51 +01:00
- name: number_bookings_with_service_status_not_protected
2025-02-13 17:13:05 +01:00
data_type: bigint
description: "Number of bookings with status NOT PROTECTED for this service."
2025-02-14 08:35:51 +01:00
- name: number_bookings_with_service_status_not_paid
2025-02-13 17:13:05 +01:00
data_type: bigint
description: "Number of bookings with status NOT PAID for this service."
2025-02-14 08:35:51 +01:00
- name: number_bookings_with_service_status_confirmed
2025-02-13 17:13:05 +01:00
data_type: bigint
description: "Number of bookings with status CONFIRMED for this service."
2025-02-14 08:35:51 +01:00
- name: number_bookings_with_service_status_for_review
2025-02-13 17:13:05 +01:00
data_type: bigint
description: "Number of bookings with status FOR REVIEW for this service."
2025-02-14 08:35:51 +01:00
- name: number_bookings_with_service_status_flagged
2025-02-13 17:13:05 +01:00
data_type: bigint
description: "Number of bookings with status FLAGGED for this service."
2025-02-12 09:09:16 +01:00
2025-02-04 11:24:46 +01:00
- 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"
2025-02-04 14:14:00 +01:00
- 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.
2025-02-04 11:24:46 +01:00
- 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.
2025-02-10 18:42:15 +01:00
- 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.
2025-02-04 11:24:46 +01:00
- 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: |
2025-02-11 10:44:19 +01:00
The amount payable to the host with taxes, in local currency.
2025-02-04 11:24:46 +01:00
- name: amount_due_to_host_in_gbp
data_type: numeric
description: |
2025-02-11 10:44:19 +01:00
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.
2025-02-04 11:24:46 +01:00
- name: superhog_fee_in_txn_currency
data_type: numeric
description: |
2025-02-11 10:44:19 +01:00
The service fee charged by Superhog with taxes, in local currency.
2025-02-04 11:24:46 +01:00
- name: superhog_fee_in_gbp
data_type: numeric
description: |
2025-02-11 10:44:19 +01:00
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.
2025-02-04 11:24:46 +01:00
- name: currency
data_type: text
description: |
The ISO 4217 currency code (e.g., GBP, USD, EUR) in which the payment
was originally made.
2025-02-04 14:14:00 +01:00
- name: exchange_rate_to_gbp
data_type: numeric
description: |
The exchange rate used to convert the payment amount from local currency
to GBP.
2025-02-19 11:53:19 +01:00
- 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.
2025-02-19 15:29:05 +01:00
- 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."
2025-02-04 14:14:00 +01:00
- 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.
2025-02-10 18:42:15 +01:00
- name: host_first_name
2025-02-04 11:24:46 +01:00
data_type: character varying
description: First name of the host receiving the payment.
2025-02-10 18:42:15 +01:00
- name: host_last_name
2025-02-04 11:24:46 +01:00
data_type: character varying
description: Last name of the host receiving the payment.
2025-02-10 18:42:15 +01:00
- name: host_email
2025-02-04 11:24:46 +01:00
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.
2025-02-04 14:14:00 +01:00
- name: host_country
data_type: character varying
description: |
The country name of the host.
2025-02-04 11:24:46 +01:00
- 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.
2025-02-10 18:42:15 +01:00
- 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.
2025-02-19 14:57:44 +01:00
- name: id_accommodation
data_type: character varying
description: |
"Id of the accommodation or listing."
- name: accommodation_name
2025-02-04 11:24:46 +01:00
data_type: character varying
description: |
A user-friendly name for the booking or transaction, often used for
display purposes.
2025-02-19 14:57:44 +01:00
- 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
2025-02-04 11:24:46 +01:00
data_type: character varying
description: |
The first line of the property address associated with the payment.
2025-02-19 14:57:44 +01:00
- name: accommodation_postcode
data_type: character varying
description: |
The postal code of the property address associated with the payment
for the booking.
2025-02-04 11:24:46 +01:00
- 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).
2025-02-19 08:59:49 +01:00
2025-02-19 10:56:43 +01:00
- name: core__active_property_managers_system
2025-02-19 08:59:49 +01:00
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:
2025-02-19 11:57:58 +01:00
- name: active_pms_name
2025-02-19 08:59:49 +01:00
data_type: text
description: |
2025-02-19 11:57:58 +01:00
The name of the active property management system.
2025-02-19 08:59:49 +01:00
data_tests:
- not_null
- name: id_user_host
data_type: character varying
description: |
2025-02-19 09:08:21 +01:00
The unique ID for the host.
data_tests:
- not_null
- unique
2025-02-19 08:59:49 +01:00
- 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.