more features into reporting

This commit is contained in:
Joaquin Ossa 2024-10-02 10:57:30 +02:00
parent bf01360fba
commit aab6155b67
4 changed files with 144 additions and 12 deletions

View file

@ -82,7 +82,17 @@ with
select
v.id_verification,
v.id_booking,
v.id_user_partner,
v.id_accommodation,
v.listing_town,
v.listing_country,
v.verification_status,
v.channel,
v.company_name,
v.is_cancelled,
er.currency,
v.nightly_fee_local,
v.number_nights,
er.ok_status_fee_in_txn_currency,
er.ok_status_fee_in_gbp,
er.rejected_fee_in_txn_currency,
@ -98,6 +108,8 @@ select
else 0
end as cancelled_fee_in_gbp,
v.created_date_utc,
v.cancelled_date_utc,
v.checkin_date_utc,
v.checkout_date_utc
from int_edeposit__verifications v
inner join edeposit_records er on er.id_verification = v.id_verification

View file

@ -231,12 +231,56 @@ models:
# tests:
# - not_null
- name: id_user_partner
data_type: text
description: "unique Superhog generated id for partner"
# tests:
# - not_null
- name: id_accommodation
data_type: text
description: "unique Superhog generated id for a listing"
# tests:
# - not_null
- name: listing_town
data_type: text
description: "town name where the listing is located"
- name: listing_country
data_type: text
description: "country name where the listing is located"
- name: verification_status
data_type: text
description: "status of the verification"
- name: channel
data_type: text
description: ""
- name: company_name
data_type: text
description: ""
- name: is_cancelled
data_type: boolean
description: "true if the booking was cancelled"
- name: currency
data_type: text
description: "currency in which the transaction actually happened"
# tests:
# - not_null
- name: nightly_fee_local
data_type: double precision
description: "fee charged per night"
- name: number_nights
data_type: integer
description: "number of nights for the booking"
- name: ok_status_fee_in_txn_currency
data_type: numeric
description: "fee charged in used currency for approved or flagged verifications and not cancelled"
@ -291,18 +335,28 @@ models:
# min_value: 0
# strictly: false
- name: checkout_date_utc
data_type: date
description: "Date of checkout for the booking"
# tests:
# - not_null
- name: created_date_utc
data_type: date
description: "Date of creation of the verification in the system"
# tests:
# - not_null
- name: cancelled_date_utc
data_type: date
description: "Date of cancellation for the booking"
- name: checkin_date_utc
data_type: date
description: "Date of checkin for the booking"
# tests:
# - not_null
- name: checkout_date_utc
data_type: date
description: "Date of checkout for the booking"
# tests:
# - not_null
- name: int_edeposit__guesty_verifications
description: "This table shows all verification for Guesty.
The charged fee is 2GBP per booked night if booking is approved

View file

@ -6,7 +6,17 @@ with
select
vf.id_verification as id_verification,
vf.id_booking as id_booking,
vf.id_user_partner as id_user_partner,
vf.id_accommodation as id_accommodation,
vf.listing_town as listing_town,
vf.listing_country as listing_country,
vf.verification_status as verification_status,
vf.channel as channel,
vf.company_name as company_name,
vf.is_cancelled as is_cancelled,
vf.currency as currency,
vf.nightly_fee_local as nightly_fee_local,
vf.number_nights as number_nights,
vf.ok_status_fee_in_txn_currency as ok_status_fee_in_txn_currency,
vf.ok_status_fee_in_gbp as ok_status_fee_in_gbp,
vf.rejected_fee_in_txn_currency as rejected_fee_in_txn_currency,
@ -14,5 +24,7 @@ select
vf.cancelled_fee_in_gbp as cancelled_fee_in_gbp,
vf.cancelled_fee_in_txn_currency as cancelled_fee_in_txn_currency,
vf.created_date_utc as created_date_utc,
vf.cancelled_date_utc as cancelled_date_utc,
vf.checkin_date_utc as checkin_date_utc,
vf.checkout_date_utc as checkout_date_utc
from int_edeposit__verification_fees vf

View file

@ -25,12 +25,56 @@ models:
# - not_null
# - unique
- name: id_user_partner
data_type: text
description: "unique Superhog generated id for partner"
# tests:
# - not_null
- name: id_accommodation
data_type: text
description: "unique Superhog generated id for a listing"
# tests:
# - not_null
- name: listing_town
data_type: text
description: "town name where the listing is located"
- name: listing_country
data_type: text
description: "country name where the listing is located"
- name: verification_status
data_type: text
description: "status of the verification"
- name: channel
data_type: text
description: ""
- name: company_name
data_type: text
description: ""
- name: is_cancelled
data_type: boolean
description: "true if the booking was cancelled"
- name: currency
data_type: text
description: "currency in which the transaction actually happened"
# tests:
# - not_null
- name: nightly_fee_local
data_type: double precision
description: "fee charged per night"
- name: number_nights
data_type: integer
description: "number of nights for the booking"
- name: ok_status_fee_in_txn_currency
data_type: numeric
description: "fee charged in used currency for approved or flagged verifications and not cancelled"
@ -85,18 +129,28 @@ models:
# min_value: 0
# strictly: false
- name: checkout_date_utc
data_type: date
description: "Date of checkout for the booking"
# tests:
# - not_null
- name: created_date_utc
data_type: date
description: "Date of creation of the verification in the system"
# tests:
# - not_null
- name: cancelled_date_utc
data_type: date
description: "Date of cancellation for the booking"
- name: checkin_date_utc
data_type: date
description: "Date of checkin for the booking"
# tests:
# - not_null
- name: checkout_date_utc
data_type: date
description: "Date of checkout for the booking"
# tests:
# - not_null
- name: edeposit__guesty_verifications
description: "This table shows all verification for Guesty.
The charged fee is 2GBP per booked night if booking is approved