Merged PR 3025: more features into reporting

# Description

Included more information in the reporting model to add more details in the report

# Checklist

- [x] The edited models and dependants run properly with production data.
- [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

- [ ] Check if a full-refresh is required after this PR is merged.

more features into reporting
This commit is contained in:
Joaquin Ossa 2024-10-02 09:03:42 +00:00
commit 008f0f9987
4 changed files with 144 additions and 12 deletions

View file

@ -82,7 +82,17 @@ with
select select
v.id_verification, v.id_verification,
v.id_booking, 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, er.currency,
v.nightly_fee_local,
v.number_nights,
er.ok_status_fee_in_txn_currency, er.ok_status_fee_in_txn_currency,
er.ok_status_fee_in_gbp, er.ok_status_fee_in_gbp,
er.rejected_fee_in_txn_currency, er.rejected_fee_in_txn_currency,
@ -98,6 +108,8 @@ select
else 0 else 0
end as cancelled_fee_in_gbp, end as cancelled_fee_in_gbp,
v.created_date_utc, v.created_date_utc,
v.cancelled_date_utc,
v.checkin_date_utc,
v.checkout_date_utc v.checkout_date_utc
from int_edeposit__verifications v from int_edeposit__verifications v
inner join edeposit_records er on er.id_verification = v.id_verification inner join edeposit_records er on er.id_verification = v.id_verification

View file

@ -231,12 +231,56 @@ models:
# tests: # tests:
# - not_null # - 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 - name: currency
data_type: text data_type: text
description: "currency in which the transaction actually happened" description: "currency in which the transaction actually happened"
# tests: # tests:
# - not_null # - 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 - name: ok_status_fee_in_txn_currency
data_type: numeric data_type: numeric
description: "fee charged in used currency for approved or flagged verifications and not cancelled" description: "fee charged in used currency for approved or flagged verifications and not cancelled"
@ -291,18 +335,28 @@ models:
# min_value: 0 # min_value: 0
# strictly: false # strictly: false
- name: checkout_date_utc
data_type: date
description: "Date of checkout for the booking"
# tests:
# - not_null
- name: created_date_utc - name: created_date_utc
data_type: date data_type: date
description: "Date of creation of the verification in the system" description: "Date of creation of the verification in the system"
# tests: # tests:
# - not_null # - 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 - name: int_edeposit__guesty_verifications
description: "This table shows all verification for Guesty. description: "This table shows all verification for Guesty.
The charged fee is 2GBP per booked night if booking is approved The charged fee is 2GBP per booked night if booking is approved

View file

@ -6,7 +6,17 @@ with
select select
vf.id_verification as id_verification, vf.id_verification as id_verification,
vf.id_booking as id_booking, 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.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_txn_currency as ok_status_fee_in_txn_currency,
vf.ok_status_fee_in_gbp as ok_status_fee_in_gbp, vf.ok_status_fee_in_gbp as ok_status_fee_in_gbp,
vf.rejected_fee_in_txn_currency as rejected_fee_in_txn_currency, 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_gbp as cancelled_fee_in_gbp,
vf.cancelled_fee_in_txn_currency as cancelled_fee_in_txn_currency, vf.cancelled_fee_in_txn_currency as cancelled_fee_in_txn_currency,
vf.created_date_utc as created_date_utc, 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 vf.checkout_date_utc as checkout_date_utc
from int_edeposit__verification_fees vf from int_edeposit__verification_fees vf

View file

@ -25,12 +25,56 @@ models:
# - not_null # - not_null
# - unique # - 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 - name: currency
data_type: text data_type: text
description: "currency in which the transaction actually happened" description: "currency in which the transaction actually happened"
# tests: # tests:
# - not_null # - 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 - name: ok_status_fee_in_txn_currency
data_type: numeric data_type: numeric
description: "fee charged in used currency for approved or flagged verifications and not cancelled" description: "fee charged in used currency for approved or flagged verifications and not cancelled"
@ -85,18 +129,28 @@ models:
# min_value: 0 # min_value: 0
# strictly: false # strictly: false
- name: checkout_date_utc
data_type: date
description: "Date of checkout for the booking"
# tests:
# - not_null
- name: created_date_utc - name: created_date_utc
data_type: date data_type: date
description: "Date of creation of the verification in the system" description: "Date of creation of the verification in the system"
# tests: # tests:
# - not_null # - 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 - name: edeposit__guesty_verifications
description: "This table shows all verification for Guesty. description: "This table shows all verification for Guesty.
The charged fee is 2GBP per booked night if booking is approved The charged fee is 2GBP per booked night if booking is approved