changed ok_status_fee_in_gbp and added to description
This commit is contained in:
parent
126973ce1c
commit
7087e9193c
2 changed files with 8 additions and 11 deletions
|
|
@ -1,5 +1,7 @@
|
||||||
{% set cost_per_night = 2 %}
|
{% set ok_status = "Approved" %}
|
||||||
-- 2GBP/booked night if booking is approved, to be charged on checkout
|
-- 2GBP/booked night if booking is approved, to be charged on checkout
|
||||||
|
{% set cost_per_night = 2 %}
|
||||||
|
-- verifications for bookings of 0 nights length (free verifications)
|
||||||
{% set zero_nights_verifications = (
|
{% set zero_nights_verifications = (
|
||||||
"1e2_IdjTfE-5-63wsVvsLw",
|
"1e2_IdjTfE-5-63wsVvsLw",
|
||||||
"1eyQxaOrik-tDDY-50yETw",
|
"1eyQxaOrik-tDDY-50yETw",
|
||||||
|
|
@ -75,7 +77,6 @@
|
||||||
"Y8LYI_4QE0W0ShG1jAVaDA",
|
"Y8LYI_4QE0W0ShG1jAVaDA",
|
||||||
"ZpbBtHGa2E6JaLgX1LsYLQ",
|
"ZpbBtHGa2E6JaLgX1LsYLQ",
|
||||||
) %}
|
) %}
|
||||||
-- verifications for bookings of 0 nights length (free verifications)
|
|
||||||
with
|
with
|
||||||
int_edeposit__verifications as (
|
int_edeposit__verifications as (
|
||||||
select * from {{ ref("int_edeposit__verifications") }}
|
select * from {{ ref("int_edeposit__verifications") }}
|
||||||
|
|
@ -84,12 +85,12 @@ select
|
||||||
v.id_verification,
|
v.id_verification,
|
||||||
v.id_booking,
|
v.id_booking,
|
||||||
v.is_cancelled,
|
v.is_cancelled,
|
||||||
v.number_nights * {{ cost_per_night }} as total_revenue,
|
v.number_nights * {{ cost_per_night }} as ok_status_fee_in_gbp,
|
||||||
v.created_date_utc,
|
v.created_date_utc,
|
||||||
v.checkout_date_utc
|
v.checkout_date_utc
|
||||||
from int_edeposit__verifications v
|
from int_edeposit__verifications v
|
||||||
where
|
where
|
||||||
v.verification_source = 'Guesty'
|
v.version = 'V1'
|
||||||
and v.verification_status = 'Approved'
|
and v.verification_status = '{{ ok_status }}'
|
||||||
and v.id_booking is not null
|
and v.id_booking is not null
|
||||||
and v.id_verification not in {{ zero_nights_verifications }}
|
and v.id_verification not in {{ zero_nights_verifications }}
|
||||||
|
|
|
||||||
|
|
@ -333,15 +333,11 @@ models:
|
||||||
description: "indicates if the booking has been cancelled or not."
|
description: "indicates if the booking has been cancelled or not."
|
||||||
tests:
|
tests:
|
||||||
- not_null
|
- not_null
|
||||||
- accepted_values:
|
|
||||||
values:
|
|
||||||
- true
|
|
||||||
- false
|
|
||||||
|
|
||||||
- name: total_revenue
|
- name: ok_status_fee_in_gbp
|
||||||
data_type: integer
|
data_type: integer
|
||||||
description:
|
description:
|
||||||
"total fee charged on checkout"
|
"total fee charged on checkout, this is only charged for approved verifications"
|
||||||
tests:
|
tests:
|
||||||
- not_null
|
- not_null
|
||||||
- dbt_expectations.expect_column_values_to_be_between:
|
- dbt_expectations.expect_column_values_to_be_between:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue