From aaa0b1a5dd3008dd6cc106c12f13e63cfd54ca6e Mon Sep 17 00:00:00 2001 From: Joaquin Ossa Date: Wed, 26 Feb 2025 16:45:01 +0100 Subject: [PATCH] changed name --- .../int_resolutions__incidents.sql | 10 ++++----- models/intermediate/resolutions/schema.yml | 22 +++++++++---------- .../resolutions/resolutions__incidents.sql | 10 ++++----- models/reporting/resolutions/schema.yml | 22 +++++++++---------- models/staging/resolutions/schema.yml | 14 ++++++------ .../stg_resolutions__incidents.sql | 6 ++--- 6 files changed, 42 insertions(+), 42 deletions(-) diff --git a/models/intermediate/resolutions/int_resolutions__incidents.sql b/models/intermediate/resolutions/int_resolutions__incidents.sql index 336ac12..a7e8726 100644 --- a/models/intermediate/resolutions/int_resolutions__incidents.sql +++ b/models/intermediate/resolutions/int_resolutions__incidents.sql @@ -192,12 +192,12 @@ select (i.calculated_payout_amount_in_usd * cer.rate)::decimal( 19, 4 ) as calculated_payout_amount_in_gbp, - i.calculated_guest_charge_amount_in_txn_currency, - i.calculated_guest_charge_currency, - i.calculated_guest_charge_amount_in_usd, - (i.calculated_guest_charge_amount_in_usd * cer.rate)::decimal( + i.submitted_guest_charge_amount_in_txn_currency, + i.submitted_guest_charge_currency, + i.submitted_guest_charge_amount_in_usd, + (i.submitted_guest_charge_amount_in_usd * cer.rate)::decimal( 19, 4 - ) as calculated_guest_charge_amount_in_gbp, + ) as submitted_guest_charge_amount_in_gbp, -- Host Details i.id_user_host, diff --git a/models/intermediate/resolutions/schema.yml b/models/intermediate/resolutions/schema.yml index 8b44fc0..5e9894a 100644 --- a/models/intermediate/resolutions/schema.yml +++ b/models/intermediate/resolutions/schema.yml @@ -211,32 +211,32 @@ models: min_value: 0 strictly: false - - name: calculated_guest_charge_amount_in_txn_currency - data_type: text - description: "Calculated guest charge amount in local currency." + - name: submitted_guest_charge_amount_in_txn_currency + data_type: numeric + description: "Submitted guest charge amount in local currency." data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false - - name: calculated_guest_charge_currency + - name: submitted_guest_charge_currency data_type: text - description: "Currency of the calculated guest charge amount." + description: "Currency of the submitted guest charge amount." data_tests: - not_null: - where: "calculated_guest_charge_amount_in_txn_currency > 0" + where: "submitted_guest_charge_amount_in_txn_currency > 0" - - name: calculated_guest_charge_amount_in_usd - data_type: text - description: "Calculated guest charge amount in USD." + - name: submitted_guest_charge_amount_in_usd + data_type: numeric + description: "Submitted guest charge amount in USD." data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false - - name: calculated_guest_charge_amount_in_gbp + - name: submitted_guest_charge_amount_in_gbp data_type: text - description: "Calculated guest charge amount in GBP." + description: "Submitted guest charge amount in GBP." data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 diff --git a/models/reporting/resolutions/resolutions__incidents.sql b/models/reporting/resolutions/resolutions__incidents.sql index c2e234c..4b97413 100644 --- a/models/reporting/resolutions/resolutions__incidents.sql +++ b/models/reporting/resolutions/resolutions__incidents.sql @@ -39,11 +39,11 @@ select calculated_payout_currency as calculated_payout_currency, calculated_payout_amount_in_usd as calculated_payout_amount_in_usd, calculated_payout_amount_in_gbp as calculated_payout_amount_in_gbp, - calculated_guest_charge_amount_in_txn_currency - as calculated_guest_charge_amount_in_txn_currency, - calculated_guest_charge_currency as calculated_guest_charge_currency, - calculated_guest_charge_amount_in_usd as calculated_guest_charge_amount_in_usd, - calculated_guest_charge_amount_in_gbp as calculated_guest_charge_amount_in_gbp, + submitted_guest_charge_amount_in_txn_currency + as submitted_guest_charge_amount_in_txn_currency, + submitted_guest_charge_currency as submitted_guest_charge_currency, + submitted_guest_charge_amount_in_usd as submitted_guest_charge_amount_in_usd, + submitted_guest_charge_amount_in_gbp as submitted_guest_charge_amount_in_gbp, id_user_host as id_user_host, host_account_name as host_account_name, host_email as host_email, diff --git a/models/reporting/resolutions/schema.yml b/models/reporting/resolutions/schema.yml index 62e55ea..564883b 100644 --- a/models/reporting/resolutions/schema.yml +++ b/models/reporting/resolutions/schema.yml @@ -211,32 +211,32 @@ models: min_value: 0 strictly: false - - name: calculated_guest_charge_amount_in_txn_currency - data_type: text - description: "Calculated guest charge amount in local currency." + - name: submitted_guest_charge_amount_in_txn_currency + data_type: numeric + description: "Submitted guest charge amount in local currency." data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false - - name: calculated_guest_charge_currency + - name: submitted_guest_charge_currency data_type: text - description: "Currency of the calculated guest charge amount." + description: "Currency of the submitted guest charge amount." data_tests: - not_null: - where: "calculated_guest_charge_amount_in_txn_currency > 0" + where: "submitted_guest_charge_amount_in_txn_currency > 0" - - name: calculated_guest_charge_amount_in_usd - data_type: text - description: "Calculated guest charge amount in USD." + - name: submitted_guest_charge_amount_in_usd + data_type: numeric + description: "Submitted guest charge amount in USD." data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false - - name: calculated_guest_charge_amount_in_gbp + - name: submitted_guest_charge_amount_in_gbp data_type: text - description: "Calculated guest charge amount in GBP." + description: "Submitted guest charge amount in GBP." data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 diff --git a/models/staging/resolutions/schema.yml b/models/staging/resolutions/schema.yml index fcf6233..3e80918 100644 --- a/models/staging/resolutions/schema.yml +++ b/models/staging/resolutions/schema.yml @@ -365,24 +365,24 @@ models: min_value: 0 strictly: false - - name: calculated_guest_charge_amount_in_txn_currency + - name: submitted_guest_charge_amount_in_txn_currency data_type: numeric - description: "Calculated guest charge amount in local currency." + description: "Submitted guest charge amount in local currency." data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false - - name: calculated_guest_charge_currency + - name: submitted_guest_charge_currency data_type: text - description: "Currency of the calculated guest charge amount." + description: "Currency of the submitted guest charge amount." data_tests: - not_null: - where: "calculated_guest_charge_amount_in_txn_currency > 0" + where: "submitted_guest_charge_amount_in_txn_currency > 0" - - name: calculated_guest_charge_amount_in_usd + - name: submitted_guest_charge_amount_in_usd data_type: numeric - description: "Calculated guest charge amount in USD." + description: "Submitted guest charge amount in USD." data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 diff --git a/models/staging/resolutions/stg_resolutions__incidents.sql b/models/staging/resolutions/stg_resolutions__incidents.sql index c1f5a07..af62730 100644 --- a/models/staging/resolutions/stg_resolutions__incidents.sql +++ b/models/staging/resolutions/stg_resolutions__incidents.sql @@ -233,15 +233,15 @@ select {{ adapter.quote("documents") }} -> 'SavedCalculation' ->> 'SubmittedGuestChargeAmount' - )::numeric as calculated_guest_charge_amount_in_txn_currency, + )::numeric as submitted_guest_charge_amount_in_txn_currency, {{ adapter.quote("documents") }} -> 'SavedCalculation' - ->> 'SubmittedGuestChargeCurrency' as calculated_guest_charge_currency, + ->> 'SubmittedGuestChargeCurrency' as submitted_guest_charge_currency, ( {{ adapter.quote("documents") }} -> 'SavedCalculation' ->> 'SubmittedGuestChargeAmountInUsd' - )::numeric as calculated_guest_charge_amount_in_usd, + )::numeric as submitted_guest_charge_amount_in_usd, -- Third Party Compensation Claim (