add docs for reporting model

This commit is contained in:
Pablo Martin 2024-05-06 17:50:08 +02:00
parent 3b1301ff6e
commit 001b59540a

View file

@ -178,3 +178,195 @@ models:
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.
- 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: 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.
- name: currency
data_type: character varying
description: The currency used by the guest for the payment.
- name: amount_in_gbp
data_type: numeric
description: The amount paid by the guest, converted into GBP.
- 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.