diff --git a/models/staging/core/schema.yml b/models/staging/core/schema.yml index 6562082..9577f8b 100644 --- a/models/staging/core/schema.yml +++ b/models/staging/core/schema.yml @@ -1461,9 +1461,9 @@ models: - not_null - unique - - name: long_stay_fee + - name: long_stay_fee_in_local_currency data_type: numeric - description: "Nightly fee for long stay bookings. + description: "Nightly fee in local currency for long stay bookings. Bookings of more than 30 days are considered long." tests: - not_null @@ -1472,9 +1472,9 @@ models: max_value: 1000 strictly: true - - name: short_stay_fee + - name: short_stay_fee_in_local_currency data_type: numeric - description: "Nightly fee for short stay bookings" + description: "Nightly fee in local currency for short stay bookings" tests: - not_null - dbt_expectations.expect_column_values_to_be_between: @@ -1492,9 +1492,9 @@ models: to: ref('stg_core__currency') field: id_currency - - name: protection_basic_amount + - name: protection_basic_amount_in_local_currency data_type: bigint - description: "Amount of basic protection coverage" + description: "Amount in local currency of basic protection coverage" tests: - not_null - dbt_expectations.expect_column_values_to_be_between: @@ -1550,9 +1550,9 @@ models: - not_null - unique - - name: booking_fee + - name: booking_fee_in_local_currency data_type: numeric - description: "Nightly fee for bookings" + description: "Nightly fee in local currency for bookings" tests: - not_null - dbt_expectations.expect_column_values_to_be_between: @@ -1570,9 +1570,9 @@ models: to: ref('stg_core__currency') field: id_currency - - name: protection_basic_amount + - name: protection_basic_amount_in_local_currency data_type: bigint - description: "Amount of basic protection coverage" + description: "Amount in local currency of basic protection coverage" tests: - not_null - dbt_expectations.expect_column_values_to_be_between: @@ -1628,9 +1628,9 @@ models: - not_null - unique - - name: long_stay_fee + - name: long_stay_fee_in_local_currency data_type: numeric - description: "Nightly fee for long stay bookings. + description: "Nightly fee in local currency for long stay bookings. Bookings of more than 30 days are considered long." tests: - not_null @@ -1639,9 +1639,9 @@ models: max_value: 1000 strictly: true - - name: short_stay_fee + - name: short_stay_fee_in_local_currency data_type: numeric - description: "Nightly fee for short stay bookings." + description: "Nightly fee in local currency for short stay bookings." tests: - not_null - dbt_expectations.expect_column_values_to_be_between: @@ -1659,9 +1659,9 @@ models: to: ref('stg_core__currency') field: id_currency - - name: protection_basic_amount + - name: protection_basic_amount_in_local_currency data_type: bigint - description: "Amount of basic protection coverage." + description: "Amount in local currency of basic protection coverage." tests: - not_null - dbt_expectations.expect_column_values_to_be_between: @@ -1669,9 +1669,9 @@ models: max_value: 1000000 strictly: true - - name: protection_extended_amount + - name: protection_extended_amount_in_local_currency data_type: bigint - description: "Amount of extended protection coverage." + description: "Amount in local currency of extended protection coverage." tests: - not_null - dbt_expectations.expect_column_values_to_be_between: @@ -1725,9 +1725,9 @@ models: - not_null - unique - - name: long_stay_fee + - name: long_stay_fee_in_local_currency data_type: numeric - description: "Nightly fee for long stay bookings. + description: "Nightly fee in local currency for long stay bookings. Bookings of more than 30 days are considered long." tests: - not_null @@ -1736,9 +1736,9 @@ models: max_value: 1000 strictly: true - - name: short_stay_fee + - name: short_stay_fee_in_local_currency data_type: numeric - description: "Nightly fee for short stay bookings." + description: "Nightly fee in local currency for short stay bookings." tests: - not_null - dbt_expectations.expect_column_values_to_be_between: @@ -1756,9 +1756,9 @@ models: to: ref('stg_core__currency') field: id_currency - - name: protection_starting_amount + - name: protection_starting_amount_in_local_currency data_type: bigint - description: "Starting amount of protection coverage." + description: "Starting amount in local currency of protection coverage." tests: - not_null - dbt_expectations.expect_column_values_to_be_between: @@ -1766,9 +1766,9 @@ models: max_value: 1000000 strictly: true - - name: protection_extended_amount + - name: protection_extended_amount_in_local_currency data_type: bigint - description: "Extended amount of protection coverage." + description: "Extended amount in local currency of protection coverage." tests: - not_null - dbt_expectations.expect_column_values_to_be_between: diff --git a/models/staging/core/stg_core__basic_protection.sql b/models/staging/core/stg_core__basic_protection.sql index 87145e9..82a1303 100644 --- a/models/staging/core/stg_core__basic_protection.sql +++ b/models/staging/core/stg_core__basic_protection.sql @@ -3,10 +3,11 @@ with stg_core__basic_protection as ( select {{ adapter.quote("Id") }} as id_basic_protection, - {{ adapter.quote("LongStay") }} as long_stay_fee, - {{ adapter.quote("ShortStay") }} as short_stay_fee, + {{ adapter.quote("LongStay") }} as long_stay_fee_in_local_currency, + {{ adapter.quote("ShortStay") }} as short_stay_fee_in_local_currency, {{ adapter.quote("CurrencyId") }} as id_currency, - {{ adapter.quote("BasicAmount") }} as protection_basic_amount, + {{ adapter.quote("BasicAmount") }} + as protection_basic_amount_in_local_currency, {{ adapter.quote("StartDate") }} as start_at_utc, cast({{ adapter.quote("StartDate") }} as date) as start_date_utc, {{ adapter.quote("EndDate") }} as end_at_utc, diff --git a/models/staging/core/stg_core__damage_waiver.sql b/models/staging/core/stg_core__damage_waiver.sql index cc0af10..8328892 100644 --- a/models/staging/core/stg_core__damage_waiver.sql +++ b/models/staging/core/stg_core__damage_waiver.sql @@ -3,9 +3,10 @@ with stg_core__damage_waiver as ( select {{ adapter.quote("Id") }} as id_damage_waiver, - {{ adapter.quote("BookingFee") }} as booking_fee, + {{ adapter.quote("BookingFee") }} as booking_fee_in_local_currency, {{ adapter.quote("CurrencyId") }} as id_currency, - {{ adapter.quote("BasicAmount") }} as protection_basic_amount, + {{ adapter.quote("BasicAmount") }} + as protection_basic_amount_in_local_currency, {{ adapter.quote("StartDate") }} as start_at_utc, cast({{ adapter.quote("StartDate") }} as date) as start_date_utc, {{ adapter.quote("EndDate") }} as end_at_utc, diff --git a/models/staging/core/stg_core__screen_and_protect.sql b/models/staging/core/stg_core__screen_and_protect.sql index a04138c..8e58d03 100644 --- a/models/staging/core/stg_core__screen_and_protect.sql +++ b/models/staging/core/stg_core__screen_and_protect.sql @@ -3,11 +3,13 @@ with stg_core__screen_and_protect as ( select {{ adapter.quote("Id") }} as id_screen_and_protect, - {{ adapter.quote("LongStay") }} as long_stay_fee, - {{ adapter.quote("ShortStay") }} as short_stay_fee, + {{ adapter.quote("LongStay") }} as long_stay_fee_in_local_currency, + {{ adapter.quote("ShortStay") }} as short_stay_fee_in_local_currency, {{ adapter.quote("CurrencyId") }} as id_currency, - {{ adapter.quote("BasicAmount") }} as protection_basic_amount, - {{ adapter.quote("ExtendedAmount") }} as protection_extended_amount, + {{ adapter.quote("BasicAmount") }} + as protection_basic_amount_in_local_currency, + {{ adapter.quote("ExtendedAmount") }} + as protection_extended_amount_in_local_currency, {{ adapter.quote("StartDate") }} as start_at_utc, cast({{ adapter.quote("StartDate") }} as date) as start_date_utc, {{ adapter.quote("EndDate") }} as end_at_utc, diff --git a/models/staging/core/stg_core__standalone_protection.sql b/models/staging/core/stg_core__standalone_protection.sql index a29b419..79bd7a6 100644 --- a/models/staging/core/stg_core__standalone_protection.sql +++ b/models/staging/core/stg_core__standalone_protection.sql @@ -5,11 +5,13 @@ with stg_core__standalone_protection as ( select {{ adapter.quote("Id") }} as id_standalone_protection, - {{ adapter.quote("LongStay") }} as long_stay_fee, - {{ adapter.quote("ShortStay") }} as short_stay_fee, + {{ adapter.quote("LongStay") }} as long_stay_fee_in_local_currency, + {{ adapter.quote("ShortStay") }} as short_stay_fee_in_local_currency, {{ adapter.quote("CurrencyId") }} as id_currency, - {{ adapter.quote("StartingAmount") }} as protection_starting_amount, - {{ adapter.quote("ExtendedAmount") }} as protection_extended_amount, + {{ adapter.quote("StartingAmount") }} + as protection_starting_amount_in_local_currency, + {{ adapter.quote("ExtendedAmount") }} + as protection_extended_amount_in_local_currency, {{ adapter.quote("StartDate") }} as start_at_utc, cast({{ adapter.quote("StartDate") }} as date) as start_date_utc, {{ adapter.quote("EndDate") }} as end_at_utc,