Added Address_validation to int_core__vr_check_in_cover
This commit is contained in:
parent
e8b76e130e
commit
ff962608ad
2 changed files with 267 additions and 3 deletions
|
|
@ -22,6 +22,9 @@ with
|
|||
where
|
||||
verification_payment_type = 'CheckInCover' -- 5 is check-in cover
|
||||
and payment_status in ('Paid', 'Refunded')
|
||||
),
|
||||
int_core__address_validations as (
|
||||
select * from {{ ref("int_core__address_validations") }}
|
||||
)
|
||||
select
|
||||
vr.id_verification_request,
|
||||
|
|
@ -43,6 +46,8 @@ select
|
|||
and vr.is_verification_request_complete
|
||||
) as is_awaiting_check_in,
|
||||
p.amount_in_txn_currency is not null as cover_was_purchased,
|
||||
av.validation_passed,
|
||||
av.notes,
|
||||
(
|
||||
p.amount_in_txn_currency is null and vr.is_verification_request_complete
|
||||
) as cover_was_rejected,
|
||||
|
|
@ -103,6 +108,9 @@ left join
|
|||
left join
|
||||
int_core__check_in_cover_prices ccp on p.currency = ccp.local_currency_iso_4217
|
||||
left join int_core__unified_user gu on gu.id_user = vr.id_user_guest
|
||||
left join
|
||||
int_core__address_validations av
|
||||
on av.id_verification_request = vr.id_verification_request
|
||||
-- 15 is Check-in cover.
|
||||
-- Adding this condition results in only keeping guest journeys that offered the
|
||||
-- check-in cover
|
||||
|
|
|
|||
|
|
@ -140,13 +140,269 @@ models:
|
|||
- unique
|
||||
|
||||
- name: int_core__vr_check_in_cover
|
||||
description:
|
||||
"This tables holds information on verification requests
|
||||
with Ckeck-in Hero available for the guests."
|
||||
columns:
|
||||
- name: id_verification_request
|
||||
data_type: character varying
|
||||
description: The unique ID for the verification request.
|
||||
data_type: bigint
|
||||
description:
|
||||
"Unique, incremental, internal ID for the related verification
|
||||
request."
|
||||
tests:
|
||||
- not_null
|
||||
- unique
|
||||
- not_null
|
||||
|
||||
- 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: id_booking
|
||||
data_type: bigint
|
||||
description: ""
|
||||
|
||||
- name: id_accommodation
|
||||
data_type: bigint
|
||||
description: "Id of the accommodation or 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: is_past_check_in
|
||||
data_type: boolean
|
||||
description: ""
|
||||
|
||||
- name: is_awaiting_check_in
|
||||
data_type: boolean
|
||||
description: ""
|
||||
|
||||
- name: cover_was_purchased
|
||||
data_type: boolean
|
||||
description:
|
||||
"Boolean to indicate if the cover was purchased by the guest or not."
|
||||
|
||||
- name: validation_passed
|
||||
data_type: boolean
|
||||
description:
|
||||
"Boolean to indicate if the validation was approved or not.
|
||||
In case there was a problem with the validation it will be Null"
|
||||
|
||||
- name: notes
|
||||
data_type: character varying
|
||||
description: "Notes in case there was some problem with the validation."
|
||||
|
||||
- name: cover_was_rejected
|
||||
data_type: boolean
|
||||
description: ""
|
||||
|
||||
- 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: check_in_at_utc
|
||||
data_type: timestamp without time zone
|
||||
description: ""
|
||||
|
||||
- name: check_in_date_utc
|
||||
data_type: date
|
||||
description: ""
|
||||
|
||||
- name: check_out_at_utc
|
||||
data_type: timestamp without time zone
|
||||
description: ""
|
||||
|
||||
- name: check_out_date_utc
|
||||
data_type: date
|
||||
description: ""
|
||||
|
||||
- name: verification_start_at_utc
|
||||
data_type: timestamp without time zone
|
||||
description: ""
|
||||
|
||||
- name: verification_start_date_utc
|
||||
data_type: date
|
||||
description: ""
|
||||
|
||||
- name: verification_end_at_utc
|
||||
data_type: timestamp without time zone
|
||||
description: ""
|
||||
|
||||
- name: verification_end_date_utc
|
||||
data_type: date
|
||||
description: ""
|
||||
|
||||
- name: link_used_at_utc
|
||||
data_type: timestamp without time zone
|
||||
description: ""
|
||||
|
||||
- name: link_used_date_utc
|
||||
data_type: date
|
||||
description: ""
|
||||
|
||||
- name: expire_at_utc
|
||||
data_type: timestamp without time zone
|
||||
description: ""
|
||||
|
||||
- name: expire_date_utc
|
||||
data_type: date
|
||||
description: ""
|
||||
|
||||
- name: is_deleted
|
||||
data_type: boolean
|
||||
description: ""
|
||||
|
||||
- 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: ""
|
||||
|
||||
- name: has_switched_to_mobile
|
||||
data_type: boolean
|
||||
description: ""
|
||||
|
||||
- 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: "Date and time at which the validation was created."
|
||||
|
||||
- name: created_date_utc
|
||||
data_type: date
|
||||
description: ""
|
||||
|
||||
- name: updated_at_utc
|
||||
data_type: timestamp without time zone
|
||||
description: "Date and time at which the validation was last updated."
|
||||
|
||||
- name: updated_date_utc
|
||||
data_type: date
|
||||
description: ""
|
||||
|
||||
- name: dwh_extracted_at_utc
|
||||
data_type: timestamp with time zone
|
||||
description: "Date and time at which the record was extracted from the backend into the DWH."
|
||||
|
||||
- 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."
|
||||
|
||||
- name: currency
|
||||
data_type: text
|
||||
description:
|
||||
"The currency in which the transaction actually happened."
|
||||
|
||||
- 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."
|
||||
|
||||
- name: payment_status
|
||||
data_type: character varying
|
||||
description:
|
||||
"The status of the payment. It can be one of: Paid, Refunded, Refund Failed."
|
||||
|
||||
- name: payment_paid_date_utc
|
||||
data_type: date
|
||||
description: ""
|
||||
|
||||
- name: checkin_cover_limit_amount_local_curr
|
||||
data_type: numeric
|
||||
description:
|
||||
"The amount for which the guest user is covered if he faces problems
|
||||
during check-in in their local currency."
|
||||
|
||||
- name: checkin_cover_limit_amount_in_gbp
|
||||
data_type: numeric
|
||||
description:
|
||||
"The amount for which the guest user is covered if he faces problems
|
||||
during check-in in GBP."
|
||||
|
||||
- name: int_core__monthly_accommodation_history_by_deal
|
||||
description: |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue