Added missing values

This commit is contained in:
Joaquin Ossa 2024-12-03 10:37:05 +01:00
parent 7a987d92c4
commit d6f30a8e67
7 changed files with 32 additions and 5 deletions

View file

@ -1,3 +1,5 @@
{% set nightly_fee_local = 2 %}
with stg_athena__verifications as (select * from {{ ref("stg_athena__verifications") }})
select
-- note that these ids are not the same as the ones found in Core DWH
@ -9,7 +11,7 @@ select
version,
case when version = 'V1' then 'Guesty' else null end as verification_source,
verification_status,
nightly_fee_local,
{{ nightly_fee_local }} as nightly_fee_local,
cast(checkout_at_utc as date) - cast(checkin_at_utc as date) as number_nights,
email_flag,
phone_flag,
@ -31,9 +33,12 @@ select
property_manager_name,
property_manager_email,
listing_name,
listing_address,
listing_town,
listing_country,
listing_postcode,
level_of_protection_amount,
level_of_protection_currency,
pets_allowed,
status_updated_at_utc,
status_updated_date_utc,

View file

@ -143,6 +143,10 @@ models:
data_type: text
description: ""
- name: listing_address
data_type: text
description: ""
- name: listing_town
data_type: text
description: ""

View file

@ -34,9 +34,12 @@ select
av.property_manager_name,
av.property_manager_email,
av.listing_name,
av.listing_address,
av.listing_town,
av.listing_country,
av.listing_postcode,
av.level_of_protection_amount,
av.level_of_protection_currency,
av.pets_allowed,
av.status_updated_at_utc,
av.status_updated_date_utc,
@ -78,9 +81,12 @@ select
ev.property_manager_name,
ev.property_manager_email,
ev.listing_name,
ev.listing_address,
ev.listing_town,
ev.listing_country,
ev.listing_postcode,
null as level_of_protection_amount,
null as level_of_protection_currency,
ev.pets_allowed,
ev.status_updated_at_utc,
ev.status_updated_date_utc,

View file

@ -1240,7 +1240,7 @@ models:
- name: nightly_fee_local
data_type: double precision
description: "fee charged per night"
description: "fee in local currency charged per night"
- name: number_nights
data_type: integer
@ -1248,7 +1248,7 @@ models:
- name: total_fee_local
data_type: double precision
description: "total fee for the booking"
description: "total fee in local currency for the booking"
- name: email_flag
data_type: text
@ -1330,6 +1330,10 @@ models:
data_type: text
description: ""
- name: listing_address
data_type: text
description: ""
- name: listing_town
data_type: text
description: ""

View file

@ -34,6 +34,7 @@ select
property_manager_name,
property_manager_email,
listing_name,
listing_address,
listing_town,
listing_country,
listing_postcode,

View file

@ -33,9 +33,12 @@ select
eav.property_manager_name as property_manager_name,
eav.property_manager_email as property_manager_email,
eav.listing_name as listing_name,
eav.listing_address as listing_address,
eav.listing_town as listing_town,
eav.listing_country as listing_country,
eav.listing_postcode as listing_postcode,
eav.level_of_protection_amount as level_of_protection_amount,
eav.level_of_protection_currency as level_of_protection_currency,
eav.pets_allowed as pets_allowed,
eav.status_updated_at_utc as status_updated_at_utc,
eav.status_updated_date_utc as status_updated_date_utc,

View file

@ -57,7 +57,7 @@ models:
- name: nightly_fee_local
data_type: double precision
description: "fee charged per night"
description: "fee in local currency charged per night"
- name: number_nights
data_type: integer
@ -65,7 +65,7 @@ models:
- name: total_fee_local
data_type: double precision
description: "total fee for the booking"
description: "total fee in local currency for the booking"
- name: email_flag
data_type: text
@ -147,6 +147,10 @@ models:
data_type: text
description: ""
- name: listing_address
data_type: text
description: ""
- name: listing_town
data_type: text
description: ""