diff --git a/models/reporting/check_in_hero/check_in_hero__checkins.sql b/models/reporting/check_in_hero/check_in_hero__checkins.sql index 265c48f..1fafd47 100644 --- a/models/reporting/check_in_hero/check_in_hero__checkins.sql +++ b/models/reporting/check_in_hero/check_in_hero__checkins.sql @@ -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, diff --git a/models/reporting/check_in_hero/schema.yml b/models/reporting/check_in_hero/schema.yml index 079bc5f..b8f5e46 100644 --- a/models/reporting/check_in_hero/schema.yml +++ b/models/reporting/check_in_hero/schema.yml @@ -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.