Merged PR 4524: Small changes

# Description

Fixed a silly mistake in the model and change one field

# 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.

Small changes

Related work items: #27811
This commit is contained in:
Joaquin Ossa 2025-02-26 16:13:26 +00:00
commit ad4dd67bc1
6 changed files with 52 additions and 52 deletions

View file

@ -125,7 +125,7 @@ with
int_daily_currency_exchange_rates cer_gbp
on dri.created_date_utc = cer_gbp.rate_date_utc
and (cm.corrective_measure ->> 'Currency') = cer_gbp.from_currency
and cer.to_currency = 'GBP'
and cer_gbp.to_currency = 'GBP'
group by dri.id_incident, dri.host_currency
),
guest_amounts_in_gbp as (
@ -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,

View file

@ -181,7 +181,7 @@ models:
strictly: false
- name: calculated_payout_amount_in_txn_currency
data_type: text
data_type: numeric
description: "Calculated payout amount in local currency."
data_tests:
- dbt_expectations.expect_column_values_to_be_between:
@ -196,7 +196,7 @@ models:
where: "calculated_payout_amount_in_txn_currency > 0"
- name: calculated_payout_amount_in_usd
data_type: text
data_type: numeric
description: "Calculated payout amount in USD."
data_tests:
- dbt_expectations.expect_column_values_to_be_between:
@ -204,39 +204,39 @@ models:
strictly: false
- name: calculated_payout_amount_in_gbp
data_type: text
data_type: numeric
description: "Calculated payout amount in GBP."
data_tests:
- dbt_expectations.expect_column_values_to_be_between:
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
data_type: text
description: "Calculated guest charge amount in GBP."
- name: submitted_guest_charge_amount_in_gbp
data_type: numeric
description: "Submitted guest charge amount in GBP."
data_tests:
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0

View file

@ -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,

View file

@ -181,7 +181,7 @@ models:
strictly: false
- name: calculated_payout_amount_in_txn_currency
data_type: text
data_type: numeric
description: "Calculated payout amount in local currency."
data_tests:
- dbt_expectations.expect_column_values_to_be_between:
@ -196,7 +196,7 @@ models:
where: "calculated_payout_amount_in_txn_currency > 0"
- name: calculated_payout_amount_in_usd
data_type: text
data_type: numeric
description: "Calculated payout amount in USD."
data_tests:
- dbt_expectations.expect_column_values_to_be_between:
@ -204,39 +204,39 @@ models:
strictly: false
- name: calculated_payout_amount_in_gbp
data_type: text
data_type: numeric
description: "Calculated payout amount in GBP."
data_tests:
- dbt_expectations.expect_column_values_to_be_between:
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
data_type: text
description: "Calculated guest charge amount in GBP."
- name: submitted_guest_charge_amount_in_gbp
data_type: numeric
description: "Submitted guest charge amount in GBP."
data_tests:
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0

View file

@ -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

View file

@ -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'
->> 'CalculatedGuestChargeAmountInUsd'
)::numeric as calculated_guest_charge_amount_in_usd,
->> 'SubmittedGuestChargeAmountInUsd'
)::numeric as submitted_guest_charge_amount_in_usd,
-- Third Party Compensation Claim
(