From 463226a44bf8eb1a049b014de93a63dd4ef3cc2b Mon Sep 17 00:00:00 2001 From: Joaquin Ossa Date: Wed, 18 Dec 2024 14:48:36 +0100 Subject: [PATCH 1/3] Staging model for all screen & protect price tables --- models/staging/core/_core_sources.yml | 8 + models/staging/core/schema.yml | 357 ++++++++++++++++++ .../core/stg_core__basic_protection.sql | 19 + .../staging/core/stg_core__damage_waiver.sql | 18 + .../core/stg_core__screen_and_protect.sql | 20 + .../core/stg_core__standalone_protection.sql | 22 ++ 6 files changed, 444 insertions(+) create mode 100644 models/staging/core/stg_core__basic_protection.sql create mode 100644 models/staging/core/stg_core__damage_waiver.sql create mode 100644 models/staging/core/stg_core__screen_and_protect.sql create mode 100644 models/staging/core/stg_core__standalone_protection.sql diff --git a/models/staging/core/_core_sources.yml b/models/staging/core/_core_sources.yml index 1f8d27a..3beec08 100644 --- a/models/staging/core/_core_sources.yml +++ b/models/staging/core/_core_sources.yml @@ -267,3 +267,11 @@ sources: identifier: ApimUser - name: ApimUserType identifier: ApimUserType + - name: BasicProtection + identifier: BasicProtection + - name: DamageWaiver + identifier: DamageWaiver + - name: ScreenAndProtect + identifier: ScreenAndProtect + - name: StandaloneProtection + identifier: StandaloneProtection diff --git a/models/staging/core/schema.yml b/models/staging/core/schema.yml index a320691..f462b61 100644 --- a/models/staging/core/schema.yml +++ b/models/staging/core/schema.yml @@ -1443,3 +1443,360 @@ models: Timestamp of when this record was extracted into DWH. tests: - not_null + + - name: stg_core__basic_protection + description: "Contains the basic protection fees and protection amounts + for different protection options and currencies." + tests: + - dbt_expectations.expect_column_pair_values_A_to_be_greater_than_B: + column_A: end_at_utc + column_B: start_at_utc + or_equal: True + columns: + - name: id_basic_protection + data_type: bigint + description: "Unique identifier of the basic protection. + Acts as the primary key for this table." + tests: + - not_null + - unique + + - name: long_stay_fee + data_type: numeric + description: "Nightly fee for long stay bookings" + tests: + - not_null + - dbt_expectations.expect_column_values_to_be_between: + min_value: 0 + max_value: 1000 + strictly: true + + - name: short_stay_fee + data_type: numeric + description: "Nightly fee for short stay bookings" + tests: + - not_null + - dbt_expectations.expect_column_values_to_be_between: + min_value: 0 + max_value: 1000 + strictly: true + + - name: id_currency + data_type: bigint + description: "Id of the currency, works as a foreign key to the + currency table" + tests: + - not_null + - relationships: + to: ref('stg_core__currency') + field: id_currency + + - name: protection_basic_amount + data_type: bigint + description: "Amount of basic protection coverage" + tests: + - not_null + - dbt_expectations.expect_column_values_to_be_between: + min_value: 0 + max_value: 1000000 + strictly: true + + - name: start_at_utc + data_type: timestamp + description: "Timestamp of when this basic protection record is active" + tests: + - not_null + + - name: start_date_utc + data_type: date + description: "Date of when this basic protection record is active" + tests: + - not_null + + - name: end_at_utc + data_type: timestamp + description: + "Timestamp of when this basic protection record is no longer active. + It can be null." + + - name: end_date_utc + data_type: date + description: + "Date of when this basic protection record is no longer active. + It can be null." + + - name: dwh_extracted_at_utc + data_type: timestamp + description: | + Timestamp of when this record was extracted into DWH. + tests: + - not_null + + - name: stg_core__damage_waiver + description: "Contains the damage waiver fees and protection amounts + for different protection options and currencies." + tests: + - dbt_expectations.expect_column_pair_values_A_to_be_greater_than_B: + column_A: end_at_utc + column_B: start_at_utc + or_equal: True + columns: + - name: id_damage_waiver + data_type: bigint + description: "Unique identifier of the damage waiver. + Acts as the primary key for this table." + tests: + - not_null + - unique + + - name: booking_fee + data_type: numeric + description: "Nightly fee for bookings" + tests: + - not_null + - dbt_expectations.expect_column_values_to_be_between: + min_value: 0 + max_value: 1000 + strictly: true + + - name: id_currency + data_type: bigint + description: "Id of the currency, works as a foreign key to the + currency table" + tests: + - not_null + - relationships: + to: ref('stg_core__currency') + field: id_currency + + - name: protection_basic_amount + data_type: bigint + description: "Amount of basic protection coverage" + tests: + - not_null + - dbt_expectations.expect_column_values_to_be_between: + min_value: 0 + max_value: 1000000 + strictly: true + + - name: start_at_utc + data_type: timestamp + description: "Timestamp of when this basic protection record is active" + tests: + - not_null + + - name: start_date_utc + data_type: date + description: "Date of when this basic protection record is active" + tests: + - not_null + + - name: end_at_utc + data_type: timestamp + description: + "Timestamp of when this basic protection record is no longer active. + It can be null." + + - name: end_date_utc + data_type: date + description: + "Date of when this basic protection record is no longer active. + It can be null." + + - name: dwh_extracted_at_utc + data_type: timestamp + description: | + Timestamp of when this record was extracted into DWH. + tests: + - not_null + + - name: stg_core__screen_and_protect + description: "Contains the screen and protect fees and protection amounts + for different protection options and currencies." + tests: + - dbt_expectations.expect_column_pair_values_A_to_be_greater_than_B: + column_A: end_at_utc + column_B: start_at_utc + or_equal: True + columns: + - name: id_screen_and_protect + data_type: bigint + description: "Unique identifier of the Screen and Protect record. + Acts as the primary key for this table." + tests: + - not_null + - unique + + - name: long_stay_fee + data_type: numeric + description: "Nightly fee for long stay bookings." + tests: + - not_null + - dbt_expectations.expect_column_values_to_be_between: + min_value: 0 + max_value: 1000 + strictly: true + + - name: short_stay_fee + data_type: numeric + description: "Nightly fee for short stay bookings." + tests: + - not_null + - dbt_expectations.expect_column_values_to_be_between: + min_value: 0 + max_value: 1000 + strictly: true + + - name: id_currency + data_type: bigint + description: "Id of the currency, works as a foreign key + to the currency table." + tests: + - not_null + - relationships: + to: ref('stg_core__currency') + field: id_currency + + - name: protection_basic_amount + data_type: bigint + description: "Amount of basic protection coverage." + tests: + - not_null + - dbt_expectations.expect_column_values_to_be_between: + min_value: 0 + max_value: 1000000 + strictly: true + + - name: protection_extended_amount + data_type: bigint + description: "Amount of extended protection coverage." + tests: + - not_null + - dbt_expectations.expect_column_values_to_be_between: + min_value: 0 + max_value: 100000000 + strictly: true + + - name: start_at_utc + data_type: timestamp without time zone + description: "Timestamp when this Screen and Protect record becomes active." + tests: + - not_null + + - name: start_date_utc + data_type: date + description: "Date when this Screen and Protect record becomes active." + tests: + - not_null + + - name: end_at_utc + data_type: timestamp without time zone + description: "Timestamp when this Screen and Protect record is no + longer active. It can be null." + + - name: end_date_utc + data_type: date + description: "Date when this Screen and Protect record is no + longer active. It can be null." + + - name: dwh_extracted_at_utc + data_type: timestamp with time zone + description: | + Timestamp of when this record was extracted into DWH. + tests: + - not_null + + - name: stg_core__standalone_protection + description: "Contains the standalone protection fees and protection amounts + for different protection options and currencies." + tests: + - dbt_expectations.expect_column_pair_values_A_to_be_greater_than_B: + column_A: end_at_utc + column_B: start_at_utc + or_equal: True + columns: + - name: id_standalone_protection + data_type: bigint + description: "Unique identifier for the standalone protection record. + Acts as the primary key for this table." + tests: + - not_null + - unique + + - name: long_stay_fee + data_type: numeric + description: "Nightly fee for long stay bookings." + tests: + - not_null + - dbt_expectations.expect_column_values_to_be_between: + min_value: 0 + max_value: 1000 + strictly: true + + - name: short_stay_fee + data_type: numeric + description: "Nightly fee for short stay bookings." + tests: + - not_null + - dbt_expectations.expect_column_values_to_be_between: + min_value: 0 + max_value: 1000 + strictly: true + + - name: id_currency + data_type: bigint + description: "Id of the currency, works as a foreign key + to the currency table." + tests: + - not_null + - relationships: + to: ref('stg_core__currency') + field: id_currency + + - name: protection_starting_amount + data_type: bigint + description: "Starting amount of protection coverage." + tests: + - not_null + - dbt_expectations.expect_column_values_to_be_between: + min_value: 0 + max_value: 1000000 + strictly: true + + - name: protection_extended_amount + data_type: bigint + description: "Extended amount of protection coverage." + tests: + - not_null + - dbt_expectations.expect_column_values_to_be_between: + min_value: 0 + max_value: 100000000 + strictly: true + + - name: start_at_utc + data_type: timestamp without time zone + description: "Timestamp when this standalone protection record becomes active." + tests: + - not_null + + - name: start_date_utc + data_type: date + description: "Date when this standalone protection record becomes active." + tests: + - not_null + + - name: end_at_utc + data_type: timestamp without time zone + description: "Timestamp when this standalone protection record is no + longer active. It can be null." + + - name: end_date_utc + data_type: date + description: "Date when this standalone protection record is no + longer active. It can be null." + + - name: dwh_extracted_at_utc + data_type: timestamp with time zone + description: "Timestamp of when this record was extracted into DWH." + tests: + - not_null diff --git a/models/staging/core/stg_core__basic_protection.sql b/models/staging/core/stg_core__basic_protection.sql new file mode 100644 index 0000000..87145e9 --- /dev/null +++ b/models/staging/core/stg_core__basic_protection.sql @@ -0,0 +1,19 @@ +with + raw_basic_protection as (select * from {{ source("core", "BasicProtection") }}), + 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("CurrencyId") }} as id_currency, + {{ adapter.quote("BasicAmount") }} as protection_basic_amount, + {{ adapter.quote("StartDate") }} as start_at_utc, + cast({{ adapter.quote("StartDate") }} as date) as start_date_utc, + {{ adapter.quote("EndDate") }} as end_at_utc, + cast({{ adapter.quote("EndDate") }} as date) as end_date_utc, + {{ adapter.quote("_airbyte_extracted_at") }} as dwh_extracted_at_utc + + from raw_basic_protection + ) +select * +from stg_core__basic_protection diff --git a/models/staging/core/stg_core__damage_waiver.sql b/models/staging/core/stg_core__damage_waiver.sql new file mode 100644 index 0000000..cc0af10 --- /dev/null +++ b/models/staging/core/stg_core__damage_waiver.sql @@ -0,0 +1,18 @@ +with + raw_damage_waiver as (select * from {{ source("core", "DamageWaiver") }}), + stg_core__damage_waiver as ( + select + {{ adapter.quote("Id") }} as id_damage_waiver, + {{ adapter.quote("BookingFee") }} as booking_fee, + {{ adapter.quote("CurrencyId") }} as id_currency, + {{ adapter.quote("BasicAmount") }} as protection_basic_amount, + {{ adapter.quote("StartDate") }} as start_at_utc, + cast({{ adapter.quote("StartDate") }} as date) as start_date_utc, + {{ adapter.quote("EndDate") }} as end_at_utc, + cast({{ adapter.quote("EndDate") }} as date) as end_date_utc, + {{ adapter.quote("_airbyte_extracted_at") }} as dwh_extracted_at_utc + + from raw_damage_waiver + ) +select * +from stg_core__damage_waiver diff --git a/models/staging/core/stg_core__screen_and_protect.sql b/models/staging/core/stg_core__screen_and_protect.sql new file mode 100644 index 0000000..a04138c --- /dev/null +++ b/models/staging/core/stg_core__screen_and_protect.sql @@ -0,0 +1,20 @@ +with + raw_screen_and_protect as (select * from {{ source("core", "ScreenAndProtect") }}), + 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("CurrencyId") }} as id_currency, + {{ adapter.quote("BasicAmount") }} as protection_basic_amount, + {{ adapter.quote("ExtendedAmount") }} as protection_extended_amount, + {{ adapter.quote("StartDate") }} as start_at_utc, + cast({{ adapter.quote("StartDate") }} as date) as start_date_utc, + {{ adapter.quote("EndDate") }} as end_at_utc, + cast({{ adapter.quote("EndDate") }} as date) as end_date_utc, + {{ adapter.quote("_airbyte_extracted_at") }} as dwh_extracted_at_utc + + from raw_screen_and_protect + ) +select * +from stg_core__screen_and_protect diff --git a/models/staging/core/stg_core__standalone_protection.sql b/models/staging/core/stg_core__standalone_protection.sql new file mode 100644 index 0000000..a29b419 --- /dev/null +++ b/models/staging/core/stg_core__standalone_protection.sql @@ -0,0 +1,22 @@ +with + raw_standalone_protection as ( + select * from {{ source("core", "StandaloneProtection") }} + ), + 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("CurrencyId") }} as id_currency, + {{ adapter.quote("StartingAmount") }} as protection_starting_amount, + {{ adapter.quote("ExtendedAmount") }} as protection_extended_amount, + {{ adapter.quote("StartDate") }} as start_at_utc, + cast({{ adapter.quote("StartDate") }} as date) as start_date_utc, + {{ adapter.quote("EndDate") }} as end_at_utc, + cast({{ adapter.quote("EndDate") }} as date) as end_date_utc, + {{ adapter.quote("_airbyte_extracted_at") }} as dwh_extracted_at_utc + + from raw_standalone_protection + ) +select * +from stg_core__standalone_protection From 5a92337b4367eb1d861d3d6215bfaa286b0804d2 Mon Sep 17 00:00:00 2001 From: Joaquin Ossa Date: Wed, 18 Dec 2024 14:52:46 +0100 Subject: [PATCH 2/3] Clarification of long stay --- models/staging/core/schema.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/models/staging/core/schema.yml b/models/staging/core/schema.yml index f462b61..6562082 100644 --- a/models/staging/core/schema.yml +++ b/models/staging/core/schema.yml @@ -1463,7 +1463,8 @@ models: - name: long_stay_fee data_type: numeric - description: "Nightly fee for long stay bookings" + description: "Nightly fee for long stay bookings. + Bookings of more than 30 days are considered long." tests: - not_null - dbt_expectations.expect_column_values_to_be_between: @@ -1629,7 +1630,8 @@ models: - name: long_stay_fee data_type: numeric - description: "Nightly fee for long stay bookings." + description: "Nightly fee for long stay bookings. + Bookings of more than 30 days are considered long." tests: - not_null - dbt_expectations.expect_column_values_to_be_between: @@ -1725,7 +1727,8 @@ models: - name: long_stay_fee data_type: numeric - description: "Nightly fee for long stay bookings." + description: "Nightly fee for long stay bookings. + Bookings of more than 30 days are considered long." tests: - not_null - dbt_expectations.expect_column_values_to_be_between: From 2a87e4860c2796de5be59aa21f8d2ea246e83b09 Mon Sep 17 00:00:00 2001 From: Joaquin Ossa Date: Thu, 19 Dec 2024 11:13:53 +0100 Subject: [PATCH 3/3] Added _in_local_currency to fees namings --- models/staging/core/schema.yml | 52 +++++++++---------- .../core/stg_core__basic_protection.sql | 7 +-- .../staging/core/stg_core__damage_waiver.sql | 5 +- .../core/stg_core__screen_and_protect.sql | 10 ++-- .../core/stg_core__standalone_protection.sql | 10 ++-- 5 files changed, 45 insertions(+), 39 deletions(-) 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,