Added more tests but still waiting confirmation on tests users from Ray and Ana
This commit is contained in:
parent
129b00e29b
commit
6dedbc04d7
2 changed files with 25 additions and 3 deletions
|
|
@ -217,30 +217,49 @@ models:
|
|||
- name: currency
|
||||
data_type: character varying
|
||||
description:
|
||||
"Three-letter ISO code assigned to the currency used by user.
|
||||
Note that some of them are upper cased and others not."
|
||||
"Three-letter ISO code assigned to the currency used by user."
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
regex: "^[A-Z]{3}$"
|
||||
|
||||
- name: nightly_fee
|
||||
data_type: numeric
|
||||
description: "Fee charged per night on booking"
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
# min_value: 0
|
||||
max_value: 100
|
||||
strictly: true
|
||||
|
||||
- name: cancellation_fee
|
||||
data_type: numeric
|
||||
description: "Fee charged per cancelled booking"
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
# min_value: 0
|
||||
max_value: 100
|
||||
strictly: true
|
||||
|
||||
- name: protection_lower_level
|
||||
data_type: numeric
|
||||
description: "Amount of protection given when verification is 'Passed'"
|
||||
tests:
|
||||
- not_null
|
||||
# - dbt_expectations.expect_column_values_to_be_between:
|
||||
# min_value: 0
|
||||
# strictly: true
|
||||
|
||||
- name: protection_upper_level
|
||||
data_type: numeric
|
||||
description: "Amount of protection given when verification is 'Flagged'"
|
||||
tests:
|
||||
- not_null
|
||||
# - dbt_expectations.expect_column_values_to_be_between:
|
||||
# min_value: 0
|
||||
# strictly: true
|
||||
|
||||
- name: created_at_utc
|
||||
data_type: timestamp without time zone
|
||||
|
|
|
|||
|
|
@ -6,7 +6,10 @@ with
|
|||
select
|
||||
{{ adapter.quote("Id") }} as id,
|
||||
{{ adapter.quote("UserId") }} as id_user_partner,
|
||||
{{ adapter.quote("Currency") }} as currency,
|
||||
upper(substring({{ adapter.quote("Currency") }} from 1 for 3)) as currency,
|
||||
-- this shitty thing right here is all because the currency is currently
|
||||
-- set up as a free text.
|
||||
-- they expect to fix this on the next update of E-deposit
|
||||
{{ adapter.quote("NightlyFee") }} as nightly_fee,
|
||||
{{ adapter.quote("CancellationFee") }} as cancellation_fee,
|
||||
{{ adapter.quote("ProtectionLowerLevel") }} as protection_lower_level,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue