signal model deprecation more clearly, unlock a few tests
This commit is contained in:
parent
ea4274b37c
commit
09fe9ded77
2 changed files with 62 additions and 62 deletions
|
|
@ -1,14 +1,8 @@
|
||||||
with
|
/*
|
||||||
int_athena__verifications_with_fees as (
|
This model here should not exist and will be deprecated. Downstream dependencies
|
||||||
select * from {{ ref("int_athena__verifications_with_fees") }}
|
should switch to reading from the new `athena__verification_fees`. The model
|
||||||
)
|
remains here as pointer to the new one to give downstream dependencies time to switch.
|
||||||
|
*/
|
||||||
select
|
with athena__verification_fees as (select * from {{ ref("athena__verification_fees") }})
|
||||||
avf.id_verification as id_verification,
|
select *
|
||||||
avf.id_booking as id_booking,
|
from athena__verification_fees
|
||||||
avf.verification_status as verification_status,
|
|
||||||
avf.is_cancelled as is_cancelled,
|
|
||||||
avf.ok_status_fee_in_gbp as ok_status_fee_in_gbp,
|
|
||||||
avf.created_date_utc as created_date_utc,
|
|
||||||
avf.checkout_date_utc as checkout_date_utc
|
|
||||||
from int_athena__verifications_with_fees avf
|
|
||||||
|
|
|
||||||
|
|
@ -12,30 +12,30 @@ models:
|
||||||
- name: id_verification
|
- name: id_verification
|
||||||
data_type: text
|
data_type: text
|
||||||
description: "unique Superhog generated id for this verification"
|
description: "unique Superhog generated id for this verification"
|
||||||
# tests:
|
tests:
|
||||||
# - unique
|
- unique
|
||||||
# - not_null
|
- not_null
|
||||||
|
|
||||||
- name: id_booking
|
- name: id_booking
|
||||||
data_type: text
|
data_type: text
|
||||||
description: "unique Superhog generated id for a booking.
|
description: "unique Superhog generated id for a booking.
|
||||||
note that there might be duplicate bookings on the original data
|
note that there might be duplicate bookings on the original data
|
||||||
but we remove them keeping only the verification with the most recent update."
|
but we remove them keeping only the verification with the most recent update."
|
||||||
# tests:
|
tests:
|
||||||
# - not_null
|
- not_null
|
||||||
# - unique
|
- unique
|
||||||
|
|
||||||
- name: id_user_partner
|
- name: id_user_partner
|
||||||
data_type: text
|
data_type: text
|
||||||
description: "unique Superhog generated id for partner"
|
description: "unique Superhog generated id for partner"
|
||||||
# tests:
|
tests:
|
||||||
# - not_null
|
- not_null
|
||||||
|
|
||||||
- name: id_accommodation
|
- name: id_accommodation
|
||||||
data_type: text
|
data_type: text
|
||||||
description: "unique Superhog generated id for a listing"
|
description: "unique Superhog generated id for a listing"
|
||||||
# tests:
|
tests:
|
||||||
# - not_null
|
- not_null
|
||||||
|
|
||||||
- name: listing_town
|
- name: listing_town
|
||||||
data_type: text
|
data_type: text
|
||||||
|
|
@ -64,8 +64,8 @@ models:
|
||||||
- name: currency
|
- name: currency
|
||||||
data_type: text
|
data_type: text
|
||||||
description: "currency in which the transaction actually happened"
|
description: "currency in which the transaction actually happened"
|
||||||
# tests:
|
tests:
|
||||||
# - not_null
|
- not_null
|
||||||
|
|
||||||
- name: nightly_fee_local
|
- name: nightly_fee_local
|
||||||
data_type: double precision
|
data_type: double precision
|
||||||
|
|
@ -78,62 +78,62 @@ models:
|
||||||
- name: ok_status_fee_in_txn_currency
|
- name: ok_status_fee_in_txn_currency
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
description: "fee charged in used currency for approved or flagged verifications and not cancelled"
|
description: "fee charged in used currency for approved or flagged verifications and not cancelled"
|
||||||
# tests:
|
tests:
|
||||||
# - not_null
|
- not_null
|
||||||
# - dbt_expectations.expect_column_values_to_be_between:
|
- dbt_expectations.expect_column_values_to_be_between:
|
||||||
# min_value: 0
|
min_value: 0
|
||||||
# strictly: false
|
strictly: false
|
||||||
|
|
||||||
- name: ok_status_fee_in_gbp
|
- name: ok_status_fee_in_gbp
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
description: "fee charged in gbp for approved or flagged verifications and not cancelled"
|
description: "fee charged in gbp for approved or flagged verifications and not cancelled"
|
||||||
# tests:
|
tests:
|
||||||
# - not_null
|
- not_null
|
||||||
# - dbt_expectations.expect_column_values_to_be_between:
|
- dbt_expectations.expect_column_values_to_be_between:
|
||||||
# min_value: 0
|
min_value: 0
|
||||||
# strictly: false
|
strictly: false
|
||||||
|
|
||||||
- name: rejected_fee_in_txn_currency
|
- name: rejected_fee_in_txn_currency
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
description: "fee charged in used currency for rejected verifications"
|
description: "fee charged in used currency for rejected verifications"
|
||||||
# tests:
|
tests:
|
||||||
# - not_null
|
- not_null
|
||||||
# - dbt_expectations.expect_column_values_to_be_between:
|
- dbt_expectations.expect_column_values_to_be_between:
|
||||||
# min_value: 0
|
min_value: 0
|
||||||
# strictly: false
|
strictly: false
|
||||||
|
|
||||||
- name: rejected_fee_in_gbp
|
- name: rejected_fee_in_gbp
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
description: "fee charged in gbp for rejected verifications"
|
description: "fee charged in gbp for rejected verifications"
|
||||||
# tests:
|
tests:
|
||||||
# - not_null
|
- not_null
|
||||||
# - dbt_expectations.expect_column_values_to_be_between:
|
- dbt_expectations.expect_column_values_to_be_between:
|
||||||
# min_value: 0
|
min_value: 0
|
||||||
# strictly: false
|
strictly: false
|
||||||
|
|
||||||
- name: cancelled_fee_in_txn_currency
|
- name: cancelled_fee_in_txn_currency
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
description: "fee charged in used currency for cancelled verifications"
|
description: "fee charged in used currency for cancelled verifications"
|
||||||
# tests:
|
tests:
|
||||||
# - not_null
|
- not_null
|
||||||
# - dbt_expectations.expect_column_values_to_be_between:
|
- dbt_expectations.expect_column_values_to_be_between:
|
||||||
# min_value: 0
|
min_value: 0
|
||||||
# strictly: false
|
strictly: false
|
||||||
|
|
||||||
- name: cancelled_fee_in_gbp
|
- name: cancelled_fee_in_gbp
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
description: "fee charged in gbp for cancelled verifications"
|
description: "fee charged in gbp for cancelled verifications"
|
||||||
# tests:
|
tests:
|
||||||
# - not_null
|
- not_null
|
||||||
# - dbt_expectations.expect_column_values_to_be_between:
|
- dbt_expectations.expect_column_values_to_be_between:
|
||||||
# min_value: 0
|
min_value: 0
|
||||||
# strictly: false
|
strictly: false
|
||||||
|
|
||||||
- name: created_date_utc
|
- name: created_date_utc
|
||||||
data_type: date
|
data_type: date
|
||||||
description: "Date of creation of the verification in the system"
|
description: "Date of creation of the verification in the system"
|
||||||
# tests:
|
tests:
|
||||||
# - not_null
|
- not_null
|
||||||
|
|
||||||
- name: cancelled_date_utc
|
- name: cancelled_date_utc
|
||||||
data_type: date
|
data_type: date
|
||||||
|
|
@ -142,20 +142,26 @@ models:
|
||||||
- name: checkin_date_utc
|
- name: checkin_date_utc
|
||||||
data_type: date
|
data_type: date
|
||||||
description: "Date of checkin for the booking"
|
description: "Date of checkin for the booking"
|
||||||
# tests:
|
tests:
|
||||||
# - not_null
|
- not_null
|
||||||
|
|
||||||
- name: checkout_date_utc
|
- name: checkout_date_utc
|
||||||
data_type: date
|
data_type: date
|
||||||
description: "Date of checkout for the booking"
|
description: "Date of checkout for the booking"
|
||||||
# tests:
|
tests:
|
||||||
# - not_null
|
- not_null
|
||||||
|
|
||||||
- name: edeposit__guesty_verifications
|
- name: edeposit__guesty_verifications
|
||||||
description: "This table shows all verification for Guesty.
|
description: "This table shows all verification for Guesty.
|
||||||
The charged fee is 2GBP per booked night if booking is approved
|
The charged fee is 2GBP per booked night if booking is approved
|
||||||
(considered 1 night when the checkin and checkout are on the same day),
|
(considered 1 night when the checkin and checkout are on the same day),
|
||||||
to be charged on checkout."
|
to be charged on checkout."
|
||||||
|
latest_version: 1
|
||||||
|
versions:
|
||||||
|
- v: 1
|
||||||
|
deprecation_date: "2024-10-15T00:00:00Z"
|
||||||
|
config:
|
||||||
|
alias: edeposit__guesty_verifications
|
||||||
columns:
|
columns:
|
||||||
- name: id_verification
|
- name: id_verification
|
||||||
data_type: text
|
data_type: text
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue