Removed null fields

This commit is contained in:
Joaquin Ossa 2024-12-03 11:35:03 +01:00
parent 4d0c45e49d
commit 63b3cae062
5 changed files with 11 additions and 37 deletions

View file

@ -7,7 +7,6 @@ select
id_verification,
id_booking,
id_user_partner,
id_accommodation,
version,
case when version = 'V1' then 'Guesty' else null end as verification_source,
verification_status,
@ -29,7 +28,6 @@ select
guest_last_name,
guest_first_name,
guest_telephone,
company_name,
property_manager_name,
property_manager_email,
listing_name,

View file

@ -30,10 +30,6 @@ models:
tests:
- not_null
- name: id_accommodation
data_type: text
description: "unique Superhog generated id for a listing"
- name: version
data_type: text
description: "value to identify if it is Guesty (V1) or E-deposit (V2)"
@ -127,10 +123,6 @@ models:
data_type: text
description: ""
- name: company_name
data_type: text
description: ""
- name: property_manager_name
data_type: text
description: ""

View file

@ -7,13 +7,17 @@ select
av.id_verification,
av.id_booking,
av.id_user_partner,
av.id_accommodation,
null as id_accommodation,
av.version,
av.verification_source,
av.verification_status,
av.nightly_fee_local,
av.number_nights,
av.nightly_fee_local * av.number_nights as total_fee_local,
case
when av.number_nights = 0
then av.nightly_fee_local
else av.nightly_fee_local * av.number_nights
end as total_fee_local,
av.email_flag,
av.phone_flag,
av.watch_list,
@ -30,7 +34,7 @@ select
av.guest_last_name,
av.guest_first_name,
av.guest_telephone,
av.company_name,
null as company_name,
av.property_manager_name,
av.property_manager_email,
av.listing_name,
@ -78,15 +82,15 @@ select
ev.guest_first_name,
ev.guest_telephone,
ev.company_name,
ev.property_manager_name,
ev.property_manager_email,
null as property_manager_name,
null as property_manager_email,
ev.listing_name,
ev.listing_address,
ev.listing_town,
ev.listing_country,
ev.listing_postcode,
ev.level_of_protection_amount,
ev.level_of_protection_currency,
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

@ -31,15 +31,11 @@ select
guest_first_name,
guest_telephone,
company_name,
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

@ -132,14 +132,6 @@ models:
data_type: text
description: ""
- name: property_manager_name
data_type: text
description: ""
- name: property_manager_email
data_type: text
description: ""
- name: listing_name
data_type: text
description: ""
@ -164,14 +156,6 @@ models:
data_type: boolean
description: ""
- name: level_of_protection_amount
data_type: integer
description: ""
- name: level_of_protection_currency
data_type: text
description: ""
- name: status_updated_at_utc
data_type: timestamp without time zone
description: "Timestamp when status was last updated"