Merged PR 4966: CIH API fix
# Description Now that we finally have customers on CIH API Nathan noticed an error on the report which we hadn't noticed before, the fees were not included in the reporting model and was previously being taken from the monthly model which did have them. So currently the monthly value is being displayed correctly but not the individual fees for each verification. # 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. - [ ] I have checked for DRY opportunities with other models and docs. - [ ] I've picked the right materialization for the affected models. # Other - [ ] Check if a full-refresh is required after this PR is merged. cih api fix Related work items: #29225
This commit is contained in:
commit
5267fa9fe6
2 changed files with 45 additions and 0 deletions
|
|
@ -9,6 +9,11 @@ select
|
|||
id_deal as id_deal,
|
||||
id_reservation as id_reservation,
|
||||
id_accommodation as id_accommodation,
|
||||
id_currency as id_currency,
|
||||
currency_code as currency_code,
|
||||
booking_fee_in_local_currency as booking_fee_in_local_currency,
|
||||
exchange_rate_to_gbp as exchange_rate_to_gbp,
|
||||
booking_fee_in_gbp as booking_fee_in_gbp,
|
||||
guest_last_name as guest_last_name,
|
||||
guest_first_name as guest_first_name,
|
||||
guest_email as guest_email,
|
||||
|
|
|
|||
|
|
@ -37,6 +37,46 @@ models:
|
|||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: id_currency
|
||||
data_type: bigint
|
||||
description: "Id of the currency, works as a foreign key to the
|
||||
currency table"
|
||||
data_tests:
|
||||
- not_null
|
||||
- relationships:
|
||||
to: ref('stg_core__currency')
|
||||
field: id_currency
|
||||
|
||||
- name: currency_code
|
||||
data_type: character varying
|
||||
description: Currency ISO 4217 code used by user.
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: booking_fee_in_local_currency
|
||||
data_type: numeric
|
||||
description: "Fee charged to the user for each booking in the local currency."
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
strictly: true
|
||||
|
||||
- name: exchange_rate_to_gbp
|
||||
data_type: numeric
|
||||
description: "Exchange rate used to convert the local currency to GBP."
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
strictly: true
|
||||
|
||||
- name: booking_fee_in_gbp
|
||||
data_type: numeric
|
||||
description: "Total fee charged to the user for the month in gbp."
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
strictly: true
|
||||
|
||||
- name: guest_last_name
|
||||
data_type: text
|
||||
description: Last name of the guest checking in.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue